Java tutorial
//package com.java2s; import java.io.UnsupportedEncodingException; public class Main { static public boolean isCN(String str) { try { byte[] bytes = str.getBytes("UTF-8"); if (bytes.length == str.length()) { return false; } else { return true; } } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } return false; } }