Problem using PrintStream to write to file.
807588Apr 7 2009 — edited Apr 9 2009I am trying to write some String data to a file.
I have replaced System.out with a PrintStream of my own.
When I open the file with notepad,
there are little squared at the end of each line with text written.
I'm guessing they have something to do with
the default character encoding on a PrintStream Object.
I am aware that
"All characters printed by a PrintStream are converted into bytes using the platform's default character encoding".
as I am aware of the "java.nio.charset.Charset "
class. I have tryed specifying UTF-8 and US-ASII
encoding when instantiating a PrintStream Object.
What can I do to prevent the square being written, and just using default new lines
there, no matter how the file is viewed?
(my OS is Windows XP service pack 2)
:)
?