Skip to content
New issue

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

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

Already on GitHub? # to your account

在Ubuntu下运行,合约显示乱码 #10

Open
Yunlong-He opened this issue Oct 15, 2024 · 1 comment
Open

在Ubuntu下运行,合约显示乱码 #10

Yunlong-He opened this issue Oct 15, 2024 · 1 comment

Comments

@Yunlong-He
Copy link

根据网友提示,安装了GBK编码,但是仍然显示乱码

@xiehao5
Copy link

xiehao5 commented Oct 22, 2024

首先,感谢CTP官方库选择GB18030而不是UTF-8作为默认字符集。

然后,Ubuntu通过以下命令生成GB18030字符集支持:

sudo locale-gen zh_CN.GB18030

然后,选择默认字符集:

sudo dpkg-reconfigure locales

GBK1
GBK2

然后重启。

使用PUTTY作为SSH终端,字体选择Fixedsys,Remote character set选择:Use font encoding。

(如果想用其他SSH终端,将charset设置成GB2312或GBK或GB18030或CP936。欢迎推荐其他合适的SSH客户端)

然后,SSH终端上,CTP相关程序就不会显示乱码了。

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

No branches or pull requests

2 participants