"Run Configurations" in the menu bar; then select Common on the right tab page; finally select "Other" for Encoding ->UTF8" is enough."/> "Run Configurations" in the menu bar; then select Common on the right tab page; finally select "Other" for Encoding ->UTF8" is enough.">

Home>Article>Backend Development> How to solve the problem of Chinese garbled output in Go language

How to solve the problem of Chinese garbled output in Go language

藏色散人
藏色散人 Original
2020-12-29 16:49:27 7027browse

Solution to the Chinese garbled output in Go language: first compile a Go program whose output message contains Chinese; then click "Run" -> "Run Configurations" in the menu bar; then select Common on the right Tab page ;Finally, select "Other->UTF8" for Encoding.

How to solve the problem of Chinese garbled output in Go language

The operating environment of this tutorial: Windows 10 system, Go1.11.2&&Eclipse IDE 2020-06 R version, Dell G3 computer.

Recommended tutorial: "go language"

Solution to the problem of Chinese garbled output in the Go language eclipse console:

Compile a Go program whose output message contains Chinese, click the Run button, and the console outputs garbled information, as shown below.

How to solve the problem of Chinese garbled output in Go language

Click on the menu bar "Run"-> "Run Configurations".

How to solve the problem of Chinese garbled output in Go language

Find the previous program and click to select it.

How to solve the problem of Chinese garbled output in Go language

Select Common on the right Tab page.

How to solve the problem of Chinese garbled output in Go language

Encoding select Other->UTF8.

How to solve the problem of Chinese garbled output in Go language

Click Apply and Run, and the program output will display Chinese normally.

How to solve the problem of Chinese garbled output in Go language

The above is the detailed content of How to solve the problem of Chinese garbled output in Go language. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn