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

vc++中printf中文乱码 #47

Closed
leitwolf opened this issue Dec 29, 2016 · 1 comment
Closed

vc++中printf中文乱码 #47

leitwolf opened this issue Dec 29, 2016 · 1 comment

Comments

@leitwolf
Copy link

printf("%s\n","汉字");
这样出现乱码,该什么解决呢?

@waruqi
Copy link
Member

waruqi commented Dec 29, 2016

这个跟xmake没关系吧。。你百度下setlocale的设置。。

例如在printf前,调用下:
setlocale(LC_ALL, "");
或者
setlocale(LC_ALL, "chs");

试试。。

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