Hi,
 
Please look at the attached files. The program first checks if this is a unicode file. If it is, it opens it using "ISO..." encoding and uses a UnicodeIgnoreByteReader to read from the file. This Reader extends InputStream Reader and overrides the read(...) method by returning only every alternate character (which should be valid ASCII if this is UTF-8 encoding which is mostly used in Windows).
Then, if this is not a unicode file, the program tries to open it using "ISO..." encoding (this is for the JAR and other binary files). If this also fails, the file is a text file and can be opened using default encoding.
 
Any comments / critisizms on the code are welcome.
 

Attachment: UnicodeIgnoreByteReader.java
Description: Binary data

Attachment: Emails.java
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


Reply via email to