[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newline character problems



That did it.  Thanks!

----- Original Message ----- 
From: "Lance England" <lengland@gr.com>
To: <ajug-members@www.ajug.org>
Sent: Monday, September 17, 2001 12:34 PM
Subject: RE: newline character problems


> You need to use System.getProperty("line.separator") in place of any \n
> escape sequence.
>  
> Example:
>  
> out.print("This is line 1." + System.getProperty("line.separator") +
> "This is line 2.");
>  
> Regards,
> Lance England
> Greenbrier & Russel
> 
> -----Original Message----- 
> From: Deron Pardue 
> Sent: Mon 9/17/2001 11:14 AM 
> To: ajug-members@www.ajug.org 
> Cc: 
> Subject: newline character problems
> 
> 
> I'm writing a text file via a java program.  I'm using \n for
> newlines.  If I open the file with WordPad or TextPad, the file is fine;
> however, in notepad, the newline character is unrecognized (showing up
> as that nasty little box that I hat so  much)  I've tried using \r also
> and have the same problem.  This file is ultimately being used on a
> mainframe which is reading it the same as notepad.
> 
> Thanks!
> 
> Deron
>