This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / 如何用java判断一个string中 含有中文和英文 谢谢.
-usis(人群中的卑微者,求知);
2006-12-21
(#3390455@0)
-
String s = "dddd"; s.charAt( i ) < 256 English; s.charAt( i ) > 256 noenglish (Chinese)
-maplew2008(call me at 911);
2006-12-21
(#3390507@0)
-
non english == chinese? ...
-m0m(m0m);
2006-12-21
(#3390517@0)
-
如果没记错的话,java字符串用的是utf16,查查中文在哪个范围。
-aaronding(流浪的八毛儿);
2006-12-21
(#3390579@0)
-
那法语呢? 我还是想知道如何判断英文与中文? 谢谢
-usis(人群中的卑微者,求知);
2006-12-21
(#3390530@0)
-
我曾经这么做过一个类似的程序。判断字体能否显示中文:new Font("sim hei").canDisplay('一')。希望有参考价值。
-aaronding(流浪的八毛儿);
2006-12-21
(#3390576@0)
-
s.length() == s.toByteArray().length indicates single byte languages.To test other single byte languages, you have to check whether each byte is less then 128 (ascii uses 7 bit).
-polya(EasyWave);
2006-12-22
{109}
(#3390685@0)
-
Why do you need to know? For display or saving?
-dpff(dpff);
2006-12-22
(#3390900@0)