Hi all,
I have a big problem with a small textfile.
I read a textfile that was downloaded from a webserver... like this:
The output (in Eclipse) looks like this:
Where the "." are not really dots, they are just displayed as small dots in the Eclipse console. Ok, I would not care about this, but if I try to get the length of the string it is not 5 (as expected), it is 11 !
I have already tried to convert the file with unix2dos (I am working with Windows 2000), but this will just fix the carriage-return/linefeed problem.
Does anyone have a clue what the problem is with this file??
I could filter these chars but I don't know for what kind of special is used in this file. I also wonder where this stuff comes from.
If you want to reproduce my problem just download the file here: The file I am talking about is the file under "All eligible assets", "Selection", "Full Database", "Uncompressed"... uhm... to make it easier... it is the file in the upper right corner of the page.
I appreciate any comment about this issue!
Cheers
frag
real_firestorm@gmx.de
I have a big problem with a small textfile.
I read a textfile that was downloaded from a webserver... like this:
Code:
String line;
FileInputStream fin = new FileInputStream(strImportFile);
BufferedReader myInput = new BufferedReader(new InputStreamReader(fin));
try
{
// read file (line for line)
while ((line = myInput.readLine()) != null)
{
System.out.println(line);
}
}
.
.
.
The output (in Eclipse) looks like this:
Code:
.H.e.l.l.o.
Where the "." are not really dots, they are just displayed as small dots in the Eclipse console. Ok, I would not care about this, but if I try to get the length of the string it is not 5 (as expected), it is 11 !
I have already tried to convert the file with unix2dos (I am working with Windows 2000), but this will just fix the carriage-return/linefeed problem.
Does anyone have a clue what the problem is with this file??
I could filter these chars but I don't know for what kind of special is used in this file. I also wonder where this stuff comes from.
If you want to reproduce my problem just download the file here: The file I am talking about is the file under "All eligible assets", "Selection", "Full Database", "Uncompressed"... uhm... to make it easier... it is the file in the upper right corner of the page.
I appreciate any comment about this issue!
Cheers
frag
real_firestorm@gmx.de