【 在 mayi (启明星~~蚂蚁) 的大作中提到: 】
: 有相关的函数吗?
: 如果没有,可以怎么处理呢?
BOOL ISDBCSLEAD(int CodeType,unsigned char c)
{
switch(CodeType){
case HZ_GB:
return(c>0xa0 && c<0xff);
case HZ_BIG5:
return(c>0xa0 && c<0xff);
case HZ_JPN:
return((c>0x80 && c<0xa0)||(c>0xdf && c<0xfd));
case HZ_GBK:
return(c>0x80 && c<0xff);
}
return 0;
}
BOOL ISDBCSNEXT(int CodeType,unsigned char c)
{
switch(CodeType){
case HZ_GB:
return(c>0xa0 && c<0xff);
case HZ_BIG5:
return((c>0x3f && c<0x7f)||(c>0xa0 && c<0xff));
case HZ_JPN:
return(c>0x3f && c<0xfd);
case HZ_GBK:
return((c>0x3f && c<0x7f)||(c>0x7f && c<0xff));
}
return 0;
}
--
FROM 211.96.233.1