具体可以和ascii马进行对应比较

解决方案 »

  1.   

    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.
    }
      

  2.   

    [\u4E00-\u9FA5]是所有汉字集合的正则表达式         if(inStr.matches("[\\u4E00-\\u9FA5]+")) 
                   return true;
             else 
                   return false;  
      

  3.   

    从字符到字符串的转换可以这个实现
    char[] cc = {c};
    String t = new String(cc);
    还有一种办法是
    int i = (int)'t';
    可以得到字符的unicode编码。