汉字的unicode编码可以在
http://bianma.supfree.net/sos.asp?id=3417查询;
张:
GBK编码:
D5C5
unicode编码:
5F20
十进制unicode:
24352
调试程序时可以查看到内存中“张”的值为 5f20 。这正是“张” Unicode编码,在使用这个方法之前,把“张”赋值给字符变量,将保存“张”的GBK编码 D5C5,而不是值为 5f20 的 Unicode编码。
#include"stdlib.h"
#include"stdio.h"
#include"wchar.h"
#include"locale.h"
int main()
{
setlocale(LC_ALL,"");
#include"stdio.h"
#include"wchar.h"
#include"locale.h"
int
{
}