Here you can find the source of convertCharSet(String str, String desCharset)
public static String convertCharSet(String str, String desCharset)
//package com.java2s; public class Main { public static String convertCharSet(String str, String desCharset) { return convertCharSet(str, null, desCharset); }/* www . ja v a 2s .c o m*/ public static String convertCharSet(String str, String curCharset, String desCharset) { String desStr = null; try { if (str != null) { if (curCharset != null) { desStr = new String(str.getBytes(curCharset), desCharset); } else { desStr = new String(str.getBytes(), desCharset); } } } catch (Throwable e) { } return desStr; } }