显示中文问题
知道一个汉字的GB2312码值,如何显示出对应的汉字?
比如知道“测”的值是B2E2,如何显示出对应的“测”字?
[解决办法]
仅供参考
#include <stdio.h>#include <locale.h>unsigned short ws[]={ 0x6c49,0x5b57,0x0000};void main() { printf("\xba\xba\xd7\xd6\n"); setlocale(LC_ALL,"chs"); wprintf(L"%s\n",ws); wprintf((const unsigned short *)"\x49\x6c\x57\x5b\x0a\x00\x00");}//汉字//汉字//汉字