Hi,
I've a problem with new line character. I am in Windows platform but
when I write a file with a BufferedWitter with println I obtain the
character "\n" x0D like separator (Unix Separator). My System property
line.separator is "\r\n".
Can someone tell me how can I obtain files with the correct \r\n
Windows new line character?.
Thanks in advance.
Brzezi - 17 Apr 2006 12:43 GMT
pon, 17 kwi 2006 o 12:06 GMT, fealfu@gmail.com napisał(a):
> I've a problem with new line character. I am in Windows platform but
> when I write a file with a BufferedWitter with println I obtain the
> character "\n"
Say a bit more about how you are doing that, or it`ll be better if you
could paste some sourcecode...
Pozdrawiam
Brzezi

Signature
[ E-mail: brzezi@enter.net.pl ][ ]
[ Ekg: #3781111 ][ ]
[ LinuxUser: #249916 ][ ]
fealfu@gmail.com - 17 Apr 2006 13:12 GMT
Resolved
The problem was another process that automatically was replacing "\r\n"
form "\n" and I don´t know it.
All works fine.
Thanks a lot.
Roedy Green - 17 Apr 2006 20:45 GMT
>I've a problem with new line character. I am in Windows platform but
>when I write a file with a BufferedWitter with println I obtain the
>character "\n" x0D like separator (Unix Separator). My System property
>line.separator is "\r\n".
Only println knows the line separator convention. Everything else
just prints what you tell it literally. For sample code see
http://mindprod.com/applets/fileio.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.