中国开发网: 论坛: Delphi/BCB: 贴子 494513
pcplayer: 用 Delphi 提供的 Utf8Decode 函数测试的结果:如果是Ascii,输出还是Ascii,不变;如果是 GB2312,输出为空字符串。
S: string;

WS: WideString;

WS := UTF8Decode(S);

if WS=S then S is ASCII

if WS='' then S is 汉字

相关信息:


欢迎光临本社区,您还没有登录,不能发贴子。请在 这里登录