遗产争族剧情简介

"; String sss = "针对帖子,从客观角度评论。修复了一些词汇,如把每一点修改标注出来吧。"; System.out.println(sss); System.out.println(encoder(sss, "utf-8")); } static String encoder(String s, String charset) { try { return URLEncoder.encode(s, charset); } catch (Exception e) { e.printStackTrace(); } return null; } /** * 将UTF-8编码字符串转换成Unicode编码字符串 * * @param in 需要转换的字符串 * @return 转换后的Unicode编码字符串 */ public static String toUnicode(String in) { char[] arChar = in.toCharArray(); int iValue = 0; StringBuffer uStrBuf = new StringBuffer(); for (int i = 0; i < arChar.length; i ) { iValue = (int) arChar[i]; if ((iValue >= 19968) && (iValue <= 171941)) {//汉字范围 uStrBuf.append("\u" Integer.toHexString(iValue)); } else { uStrBuf.append(arChar[i]); } } return uStrBuf.toString(); }}