Here you can find the source of toUTF8(String isoString)
public static String toUTF8(String isoString)
//package com.java2s; //License from project: Apache License import java.io.UnsupportedEncodingException; public class Main { /**//w w w . j a va 2s . c om * Convert ISO8859-1 format string (which is the default sent by IE * to the UTF-8 format that the database is in. */ public static String toUTF8(String isoString) { String utf8String = null; if (null != isoString && !isoString.equals("")) { try { byte[] stringBytesISO = isoString.getBytes("ISO-8859-1"); utf8String = new String(stringBytesISO, "UTF-8"); } catch (UnsupportedEncodingException e) { System.out.println("UnsupportedEncodingException is: " + e.getMessage()); utf8String = isoString; } } else { utf8String = isoString; } return utf8String; } }