Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question:在windows 11啓用unicode編碼支持後的系統中,輸入中文亂碼 #58

Open
qwe7002 opened this issue Mar 18, 2024 · 2 comments

Comments

@qwe7002
Copy link
Contributor

qwe7002 commented Mar 18, 2024

image

查了一下,大概和golang使用utf-8編碼,而windows使用GBK/Unicode處理中文編碼有關

是否可以通過在輸出回顯的時候進行轉換的方式,來在windows下支持輸入中文。

https://golang.org/x/text/encoding/simplifiedchinese

@fzdwx
Copy link
Owner

fzdwx commented Mar 18, 2024

感觉是可行的,你可以先尝试一下。

首先要确定终端的字符集,然后转换到 utf-8 ?

@qwe7002
Copy link
Contributor Author

qwe7002 commented Mar 18, 2024

是的,因爲我測試了mingw的bash,無論怎麼設置都是正常的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants