Here you can find the source of toUtf8(String str)
public static String toUtf8(String str)
//package com.java2s; //License from project: Open Source License import android.util.Log; public class Main { public static String toUtf8(String str) { try {// w w w . j a va2 s . co m return new String(str.getBytes("ISO8859_1"), "UTF-8"); } catch (Exception e) { Log.d("StringUtil-toUtf8", e.getMessage()); return str; } } }