Android examples for java.lang:String
Can string be encoded by the specified Charset
import java.nio.charset.Charset; public class Main{ public static boolean isCharset(String str, String charsetName) { return Charset.forName(charsetName).newEncoder().canEncode(str); }//from w w w . j a v a 2 s . c o m }