wprintf 输出中文
// 使用wprintf输出中文时,需调用setlocale(LC_CTYPE, ""); 将输出字符集设置为本地字符集
setlocale(LC_CTYPE, ""); // 设为本地字符集
……
setlocale(LC_CTYPE, "C"); // 恢复默认值
PS:
下列函数不需要调用setlocale:
wsprintfW() // include <Windows.h>
swprintf() // include <stdio.h>
MultiByteToWideChar // include <Windows.h>
posted on 2013-08-21 15:38 Waaaaaall-E 阅读(400) 评论(0) 编辑 收藏 举报