The ISO stands for Organization for International Standardization. ISO is a standard characters set. The ISO Latin-1 is a supper set of the ASCII character set. It is the character set for Western European languages and an 8-bit encoding scheme in which every encoded character takes exactly 8 bits. The ISO-8859-1 standard also known as "Latin alphabet No. 1".
Here, you will see how to use the ISO 8859-1 character set. This program takes the file name by user. If the given file exists then this program reads it's contents otherwise shows the appropriate message like: "File does not exist".
BufferedReader i =
new BufferedReader(new InputStreamReader(new FileInputStream(file),"8859_1"));
Above code has been written to create the instance of the BufferedReader class using InputStreamReader and FileInputStream classes to create buffer for reading contents from the specified file in standard ISO-1 format using the "8859-1", mentioned in the above line of the code.
Here is the code of program:
Output of the Program:
Enter File name : Filterfile.txt
File Text : WelCome to RoseIndia.Net
Reading Process Completly Successfully.
Posted on: April 17, 2007 If you enjoyed this post then why not add us on Google+? Add us to your Circles