WSL: when locale != 437 (english-US) the change of font can't persist(Still have problem)

  • Your Windows build number: (Type ver at a Windows Command Prompt) creator update Version 10.0.15063
  • What you’re doing and what’s happening: (Copy&paste specific commands and their output, or include screen shots) if my locale set to 950 (Traditional Chinese),the change of the font (ex. consolas) on BashOnWindows or cmd would be reset to MingLiU. However, if the locale is set to 437, the font can be changed to consolas and it will not change when i reopen bash. The problem is when I use 437 as my codepage, many application which is build in Chinese or Chinese words in the terminal will crash because they cannot display the traditional Chinese words properly, and how can i resolve it?

image

image

p.s I just try the new freature of 256-color and that is just fantastic!

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Reactions: 1
  • Comments: 19 (1 by maintainers)

Most upvoted comments

I made a new font MicrosoftYaHeiMono-CP950.ttf that support both CP950 and CP936 which can really solve the problem for Chinese (Traditional) and Chinese (Simplified) users.

You need a combined font that supports the charset CP950 likes 細明體 (It must declare support for CP950 in font meta information).

Just like me, my code page is 936 and I have been struggling with the issue for a long time. But I solved it today. I know that to solve the issue simply, I just need a font that supports the charset CP936 like SimSun. I tried some of combined fonts in Chinese and Western characters, but all didn’t work. They have CP936 characters but they may not declare support for CP936 in font meta. So I cannot find them in CMD and PowerShell property. Only find in Bash property but not permanently.

But just now, I found “Microsoft YaHei Mono”. I didn’t need any extra action, just install it, and then select this font in the Bash property. Then the font will never change again.

The font = Microsoft YaHei + Consolas (Download: Microsoft YaHei Mono.zip)

You could find (or create with font combined tools) a font that combined Consolas and 細明體 and declared support for CP950 in its font meta. Then you can select the font in Bash property directly and permanently.

@Po-wei - Hmm… Then… try other console programs like ConEmu or wsl-terminal until finding a working solution. Good luck.

@Po-wei - I use bash short cut in start menu, so not from cmd. I’m not sure the box had been unchecked initially. I meant… I had tested several times. When I began to test, I saw the problem too. And then, I tried to test with legacy/new console. I realized the problem was solved, but can’t remember when; sorry. I could not reproduce the problem again and could not turn back to legacy console, so guessed the cause might be the legacy console. Hmm… I hope it would be solved in yours.

@sunjoong The table below may be clear. Because 細明體 are not monotype font, I would like to change my font to monotype font such as consolas. However, there are some problem list below…

Case system locale font display Chinese setting persist
1(default) 950(Chinese) 細明體 yes yes
2 950(Chinese) consolas yes no
3 437 (English) 細明體 yes yes
4 437 (English) consolas no yes
5 437 (English) other font no yes

I hope whether i can use Case 2 with persist settings or Case 4 or 5 with Chinese display on terminal! Hope that table could clarify my idea 😃

@miniksa for visibility. Probably related to #757