Here you can find the source of decode(String encodeMsg)
public static String decode(String encodeMsg)
//package com.java2s; //License from project: Apache License import java.io.UnsupportedEncodingException; public class Main { public static String decode(String encodeMsg) { try {/* w w w . j a v a2 s .c o m*/ String transMsg = new String(encodeMsg.getBytes("ISO-8859-1"), "UTF-8"); return java.net.URLDecoder.decode(transMsg, "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return null; } public static String[] decode(String[] ecodeMsgs) { String[] result = new String[ecodeMsgs.length]; try { for (int i = 0; i < ecodeMsgs.length; i++) { String transMsg = new String(ecodeMsgs[i].getBytes("ISO-8859-1"), "UTF-8"); result[i] = java.net.URLDecoder.decode(transMsg, "UTF-8"); } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return result; } }