jakarta-oro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hardeep Singh" <hardeep.si...@in.velocient.com>
Subject Re: Question : Solved : Discuss
Date Tue, 29 Jan 2002 05:55:20 GMT

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.

Hardeep Singh

View raw message