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

ubuntu 20.04 CTP接口中文乱码的问题 #8

Closed
skyang2009 opened this issue Feb 21, 2021 · 3 comments
Closed

ubuntu 20.04 CTP接口中文乱码的问题 #8

skyang2009 opened this issue Feb 21, 2021 · 3 comments

Comments

@skyang2009
Copy link

有没有好的解决办法
图中是在demos文件夹下面执行python3 runDt.py

image

@wondertrader
Copy link
Owner

有没有好的解决办法
图中是在demos文件夹下面执行python3 runDt.py

image

有一个办法,就是把你控制台的编码改成gbk的,这个很难搞,要么全部翻译成英文,要不然就是你自己fork一套代码,全部改成utf8编码的。我这边处理的话,vs下编译会有问题。

@skyang2009
Copy link
Author

CTP接口返回的数据也是GBK的,转码太麻烦了,所以代码还是全用gbk好了,我现在的经验是输出的日志内容尽量用英文就可以了

@wondertrader
Copy link
Owner

CTP接口返回的数据也是GBK的,转码太麻烦了,所以代码还是全用gbk好了,我现在的经验是输出的日志内容尽量用英文就可以了

是的,我也发现了,也琢磨以后逐步改掉,不过进度没办法太快

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