Posted By:
Jobo_some
Posted On:
Sunday, May 12, 2002 04:35 PM
Hi I am reading in a unicode text file and I am getting garbage. I believe what the reader is doing is reading one BYTE at a time instead of one unicode char at a time.(2 bytes) the result is that the string has apx twice as many char and of course they are all jibrish.I would like to get one char at a time and do a comparison to find out if it is a specific char. ... BufferedReader BufferedInputFile = new BufferedReader(new FileReader(UserInputFile)); ....... ... for(int i=0; NextLine.length() > i ; i++){ if (NextLine.charAt(i)== 'u05d0' ).......... YOur help is greatly appreciated. Thanks
More>>
Hi
I am reading in a unicode text file and I am getting garbage. I believe what the reader is doing is reading one BYTE at a time instead of one unicode char at a time.(2 bytes) the result is that the string has apx twice as many char and of course they are all jibrish.I would like to get one char at a time and do a comparison to find out if it is a specific char.
...
BufferedReader BufferedInputFile = new BufferedReader(new FileReader(UserInputFile)); .......
...
for(int i=0; NextLine.length() > i ; i++){
if (NextLine.charAt(i)== 'u05d0' )..........
YOur help is greatly appreciated.
Thanks
<<Less