I have some problems with displaying Chinese characters in the Powershell console. All Chinese are shown as rectangles there. I believe this is an encoding problem. Does anyone know how to configure the Powershell console to use UTF8 encoding?
Asked
Active
Viewed 1.1k times
1 Answers
14
Have a look at this post
Current Encoding: [Console]::Out
Set Encoding (UTF8): [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
-
It seems we have to configure it for every PowerShell instance. Can we set the UTF8 encoding as default? – hackjutsu Feb 23 '16 at 19:38
-
1You can put it in the PS profile, which is loaded upon instance start. – Martin Feb 23 '16 at 22:55
-
3That makes language specific characters just disappear from the output i.e. instead of ' ŻÓŁTY ' there is just ' TY '. Is there a way to fix this? – Sharak Jan 26 '19 at 17:12