Here you can find the source of readAsUTF8(String text)
public static String readAsUTF8(String text)
//package com.java2s; //License from project: BSD License import java.nio.charset.Charset; public class Main { private final static Charset ENC_LATIN1 = Charset.forName("ISO-8859-1"); private final static Charset ENC_UTF8 = Charset.forName("UTF-8"); public static String readAsUTF8(String text) { if (text == null) return null; return new String(text.getBytes(ENC_LATIN1), ENC_UTF8); }// ww w. j a v a 2 s .co m }