You didn't post any code but I expect you are reading the text file without specifying any charset (encoding). And yes, the default charset is different in different environments.
To specify the charset to use, use an InputStreamReader like this:To decide what charset to use, that's a bit more difficult. If you created the file yourself on Windows without specifying a charset (you would use an OutputStreamWriter to do that), then you used the default charset for Windows. On my Windows box that's "cp1252" but in general it's the value of the "file.encoding" Java system property.
Joined: Jun 04, 2001
Using the following:
I have run the above with no luck. I still receive only question marks. Any other ideas?
You read the data into the program. Then you write it out again. You've changed the way you read the file several times with no changes. That suggests to me, at least, that the problem is not with the reading half of the program.
It would be easier just to put some code in your program like Or if you get something else, thenThen that would persuade me whether System.out.print doesn't handle those characters correctly. I know it doesn't on Windows (you get some other character instead) because the DOS code page isn't the same as the file charset, but I'm not familiar with Unix consoles. A console may not be a reliable testing device.
[Edited to have correct syntax] [ December 14, 2005: Message edited by: Paul Clapham ]