qt creator纯C或C++项目在windows下的命令行中文乱码解决
时间:2014-03-15 20:45:01
收藏:0
阅读:1326
//修改qtcreator_process_stub.exe的字符编码为utf8
#include <stdlib.h>
int main(void)
{
system("chcp 65001");
return
0;
}
然后右击标题栏-属性-字体,修改字体为Console。
说明:windows下chcp 65001命令将cmd的代码页修改为utf-8
这个程序就是调用windows自带的命令将cmd的代码页修改为了utf8,下次调用的时候也会保留使用utf8编码的设置。
qt creator纯C或C++项目在windows下的命令行中文乱码解决,布布扣,bubuko.com
原文:http://www.cnblogs.com/cmicat/p/3602271.html
评论(0)