String parseChinese(String in) { String s = null; byte temp []; if (in == null) { System.out.println("Warn:Chinese null founded!"); return new String(""); } try { temp=in.getBytes("iso-8859-1"); temp=in.getBytes("iso-8859-1"); s = new String(temp); } { System.out.println("Warn:Chinese null founded!"); return new String(""); } try { temp=in.getBytes("iso-8859-1"); s = new String(temp); } catch(UnsupportedEncodingException e) { System.out.println (e.toString()); } return s; } |