Here you can find the source of decodeString(String s)
public static String decodeString(String s)
//package com.java2s; import java.io.UnsupportedEncodingException; public class Main { public static String decodeString(String s) { try {/*from w w w .j a va 2 s.co m*/ if (s != null) { if (s.equals(new String(s.getBytes("iso8859-1"), "iso8859-1"))) { s = new String(s.getBytes("iso8859-1"), "utf-8"); } } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return s; } }