UTF8 characters in windows 10 bash terminal
Solution 1:
To add to Doctorj's answer, there are a couple fonts that are installed by default that you can use (on Windows 10 bash shell).
Tested languages: Bulgarian, Ukrainian, Chinese Simplified, Chinese traditional, Danish, French, German, Italian, Japanese, Kazakh, Korean, Macedonian, Mongolian, Norwegian, Polish, Portuguese, Russian, Serbian, Spanish, Swedish.
The following default fonts display all observed characters:
- MS Gothic
- NSimSun
- Doesn't appear to display all of Kazakh.
- SimSun-ExtB (raster font) - My recommendation
Both MS Gothic and NSimSun
- Spaces out non-Latin non-CJK (Chinese, Japanese, Korean) languages (Macedonian, Kazakh, Bulgarian).
- Has an odd vertical offset on accented Latin characters (á,é).
- Didn't display at least one Macedonian character.
SumSun-ExtB (raster font):
- There's a warning message saying that Raster fonts may not display well.
- Most characters are displayed darkly (could be a problem with low screen brightness).
- Non-ASCII characters are bright, in comparison to ASCII characters (possible solution, use the bold option).
- Characters of all languages close together (easier to see spacing between words).
- Seems more reliable for non-Latin non-CJK languages.
With any of these fonts, both Command Prompt and PowerShell, weird things happen when you click on non-ASCII characters, though it goes back to normal when you highlight the text.
To install a font: Note that you need to change the font for the Windows shell you're using, such as the Command Prompt or PowerShell, not the Linux way through bash. This link describes which fonts can be used on the Command Prompt (monospace fonts, and how to install and select a font for Command Prompt): Add fonts to the Command Prompt
- Bring up Registry Editor (run "regedit")
- Find the folder HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont
- Right click (or Edit) -> New -> String Value
- Name the font with one more 0 than the last one (such as "000").
- Right click the entry and select "Modify..."
- Enter the name of the font or OTF file (without .otf).
For information on installing fonts through the command line on Windows, see this question and answers.
- I tried installing "Source Code Pro" but it didn't appear in the fonts for me.
- I installed DejaVu Sans Mono and it works for most languages but doesn't work at all for CJK.
- I installed Google's Noto monospace font, and it worked, but not for CJK. Also, they specifically say they don't have monospace support for CJK.
- I installed Google's Inconsolata, and it wasn't worth the try.
- I installed GNU FreeFont (FreeMono), and it worked, but not for CJK.
- I gave up and went back to SimSun-ExtB.
(Note: I don't have enough reputation yet to post the links).
Solution 2:
Right click on the title bar at top of the bash window, choose the entry properties. In the opening window is a tab where you can change the font. I changed the Font to "Source Code Pro" and size 14.
Looks good and all utf-8 characters are working.
Solution 3:
You can try DejaVu Sans Mono - it works for me.