可以怎么实现呢?
解决方案 »
- 结构体访问违例
- 寻找高手合作
- mpString=(char **)malloc(num * sizeof(char*));这样申请空间对不对??
- 怎样将MFC风格的VC程序左上角的“无标题”几个字去掉?
- 菜鸟有礼了,菜鸟刚学vc,按照例子上的步骤安装上了mscomm控件,并写了代码,如下
- OpenGL多张影像纹理贴图,怎样把旋转中心设置成各自物体几何中心
- 这个语句什么意思?
- 关于sql server2000中判断字段空值的问题
- 新建MFC应用程序报错如何解决
- informix数据迁移到oracle里
- 请问用TCP/IP协议做的程序该怎么收发自己定义的的类
- 请问:我用MFC DLL WITH AUTOMATION实现一个COM component,要如何运行component来修改注册表呢?
1st byte 2nd byte
0x81~0xfe 0x40~0x7e and 0x80~0xfeBIG5范围:
1st byte 2nd byte
0x81~0xfe 0x40~0x7e and 0xa1~0xfe
______________
从头开始判断. 非UNICODE时.
简体中文:
字符集:GB 2312-80
代码页:CP 936
Lead byte:0xA1 - 0xFE
Trail byte:0xA1 - 0xFE繁体中文:
字符集:BIG-5
代码页:CP 950
Lead byte:0x81 - 0xFE
Trail byte:0x40 - 0x7E, 0xA1 - 0xFE日文:
字符集:Shift-JIS(Japan Industry Standard)
代码页:CP 932
Lead byte:0x81 - 0x9E, 0xE0 - 0xFC
Trail byte:0x40 - 0xfc (except 0x7F)韩文(Wansung):
字符集:KS C-5601-1987
代码页:CP 949
Lead byte:0x81 - 0xFE
Trail byte:0x41 - 0x5A, 0x61 - 0x7A, 0x81 - 0xFE还有相关的API函数请到http://msdn.microsoft.com查阅
1st byte 2nd byte
0x81~0xfe 0x40~0x7e and 0x80~0xfeif(char[0]>='\x081'&&char[0]<='\x0fe'&&( (char[1]>='\x040'&&char[0]<='\x07e') || (char[1]>='\x080'&&char[0]<='\x0fe') ) )
{//汉字
}
BYTE TestChar // character to test
);
If the byte is potentially a lead byte, it returns a nonzero value.
If the byte is not a lead byte, the return value is zero.
无法检测汉字.它无法正确区分第一字节和第二字节(第一字节和第二字节有重复部分).