How to force Windows newLine

F

fealfu

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.
 
B

Brzezi

pon, 17 kwi 2006 o 12:06 GMT, (e-mail address removed) 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
 
F

fealfu

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.
 
R

Roedy Green

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,779
Messages
2,569,606
Members
45,239
Latest member
Alex Young

Latest Threads

Top