String returnURL = java.net.URLEncoder.encode(string); String tmps = new String(type1.getBytes("ISO-8859-1"),"UTF-8");