Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure the encoding for Powershell console?

Tags:

powershell

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?

like image 559
hackjutsu Avatar asked May 12 '26 22:05

hackjutsu


1 Answers

Have a look at this post

Current Encoding: [Console]::Out

Set Encoding (UTF8): [Console]::OutputEncoding = [System.Text.Encoding]::UTF8

like image 179
Martin Avatar answered May 15 '26 15:05

Martin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!