Android examples for java.lang:String Unicode
is Charset correct this the current String
//package com.java2s; public class Main { public static boolean isCharset(String str, String charset, int judgeCharsetLength) { try {//from www . j av a 2 s.co m String temp = str.length() > judgeCharsetLength ? str .substring(0, judgeCharsetLength) : str; return temp.equals(new String(temp.getBytes(charset), charset)); } catch (Throwable e) { } return false; } }