public static final String[] encodes = new String[] { "UTF-8", "GBK", "GB2312", "ISO-8859-1", "ISO-8859-2" }; /** * 获取字符串编码格式 * * @param str * @return */ public static String getEncode(String str) { byte[] data = str.getBytes(); byte[] b = null; a:for ...