Java examples for Internationalization:Charset
Reading ISO Latin-1 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 static void main(String[] args) throws Exception { try {//w ww . j a v a 2s.c o m BufferedReader in = new BufferedReader(new InputStreamReader( new FileInputStream("infilename"), "8859_1")); String str = in.readLine(); } catch (UnsupportedEncodingException e) { } catch (IOException e) { } } }