posted 14 years ago
Thank you for the answers.
I thought I had figured things out after getting your warning about FileWriter and reading the docs, but I am apparently still missing something.
I have a text-file which was likely created on a Windows machine. According to the "file" tool on my linux machine, its encoding is "ISO-8859".
I extract certain strings from this file and write those to a new file. I have done the following, where inFile is the File object for the input file,
and outFile is the File object for the output file.
I write to osw using
Now when I open outFile in a texteditor a questionmark appears for instance where there ought to be a character with an accent egu and checking the type of
outFile with "file" again, shows that it is ASCII despite having chosen "ISO-8859-1" in the OutputStreamWriter constructor .
Hints ?