PrintWriter discrepancy in Windows and Linux environments
Posted on 2006-07-13
I noticed that when I use the following code in a windows environment:
PrintWriter writeFile = new PrintWriter(new BufferedWriter(new FileWriter(outFile)), true);
there is no problem viewing the file in notepad. However, after executing the following code in a unix environment, and then viewing it in Windows Notepad, the spacing becomes all scrambled.
My client only uses Notepad and is unable to use any other viewer. Wordwrap doesn't help.
Can someone offer advice as to how to write text to a file in a unix environment, and in Notepad, the spacing doesn't get all screwed up?