Java examples for Internationalization:Unicode
Reading UTF-8 Encoded Data
import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; public class Main { public void m() { try {//from w w w .ja v a2 s. co m BufferedReader in = new BufferedReader(new InputStreamReader( new FileInputStream("infilename"), "UTF8")); String str = in.readLine(); } catch (UnsupportedEncodingException e) { } catch (IOException e) { } } }