Orignal poster, correct me if I'm wrong, but it sounds like the _browser_ is
on Unix, not necessarily the _server_.  Asking about the line separator on
the server will always return the same value, regardless of the browser; in
fact, I can't think of any way to find out the proper line separator on the
browser side.

As long as you always output a newline ("\n", or 0x0A) as a line terminator,
it should work on every server platform, and on every browser.  This may
mean, for instance, that you need to strip out carriage return ('\r', or
0x0D) from all your pre-formatted strings, at least if "line.separator" is
not "\n".


                                                            -- Bill K.


> -----Original Message-----
> From: Tim O'Neil [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 17, 2001 12:18 PM
> To: [EMAIL PROTECTED]
> Subject: Re: inserted line feeds in concatenated strings
> 
> 
> At 07:30 PM 5/17/2001 +0200, you wrote:
> 
> >I'm seeing different browser behaviour between unix netscape
> >vs. Windows (NT) Netscape or MSIE.
> >
> >I'm generating a page with text between <PRE>...</PRE>.
> >The text is generated via out.println(text + "," + number);
> >and I get a line break after 'text' while under Unix browsers I don't
> >get a line break.
> >
> >Any idea?
> 
> Yep.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Oh, you want the idea? Use the System property to get
> the line.separator property and use that rather than
> assume that line breaks will happen. (They obviously
> won't on every platform unless you use the System
> property object, as you have experienced.)
> 
> 
> 

Reply via email to