Execute go file in cmd with Chinese garbled characters

1. Open the CMD.exe command line window

2、

chcp 65001

3. Modify the window properties and change the font

Right-click on the command line title bar, select "Properties" -> "Font", change the font to the True Type font "Lucida Console", and then click OK to apply the properties to the current window.


4.go run test.go

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324467992&siteId=291194637