Unicode in Github markdown
GithubUnicodeMarkdownGithub Flavored-MarkdownGithub Problem Overview
I just made a failed attempt to put unicode in Github markdown (in a README.md file) in my project.
I tried this:
(U+262E)
but it was not interpreted as unicode. Is there a way to put unicode characters in Github markdown?
Github Solutions
Solution 1 - Github
I believe the correct answer is to use unicode characters of the following (decimal) form
►
˿
ॠ
the above become:
► ˿ ॠ
Try it for yourself on Github and see. You have to paste the raw character strings, not the unicode symbol itself. It's not about what shows up in your editor, it's what actually displays on github.com.
Solution 2 - Github
There's no special syntax, just use the character directly... ☮.
Solution 3 - Github
You can use either decimal or hex code point or HTML entity name (if exists) of a unicode character:
€ € €
displays as
€ € €
Solution 4 - Github
This is not the complete answer that OP was asking for, but in case you want emojis for GitHub purposes there is a gist here outlining how to input them. The basic idea is just that you would input :smile:
into your markdown and that would produce a smiley face. Other commands are listed in the gist
Solution 5 - Github
If your editor saves text files in utf8 encoding with a BOM byte-order-mark, then unicode characters that you cut-and-paste seem to be rendered OK.
Solution 6 - Github
If unicode symbols are required in the code block in Github, then instead of using ``` block use <pre>
block.
Replace
```
Some text: ✘
Some text: ✓
```
With
<pre>
Some text: ✘
Some text: ✓
</pre
Solution 7 - Github
Using visual studio code Ver.1.62.2, α β Α Β
was correctly rendered in markdown preview window.