String s = ...... for (int i = 0; i<s.legnth; i++) { char c = s.charAt(c); // Get each char in the string. String t = ... c; // Convert char c to a temp string t. byte[] b = t.getBytes(); if (b.length>1) // Chinese, Japanese, Korean and so on. else // Letter, Number or Syntax. }
for (int i = 0; i<s.legnth; i++)
{
char c = s.charAt(c);
// Get each char in the string. String t = ... c;
// Convert char c to a temp string t. byte[] b = t.getBytes();
if (b.length>1)
// Chinese, Japanese, Korean and so on.
else
// Letter, Number or Syntax.
}
return true;
else
return false;
char[] cc = {c};
String t = new String(cc);
还有一种办法是
int i = (int)'t';
可以得到字符的unicode编码。