Re: JTexPane: Cross-platform chaos



On Sun, 28 Aug 2005 12:27:23 GMT, Mark Thornton wrote:

> You have to use the platform specific line separator (\n on unix, \r\n
> for windows, \r for MAC). Use System.getProperty("line.separator") to
> obtain the correct value.

The thing that has always confounded me is, assuming you
are writing a document in a Java editor on Windows that
is intended for readers using *nix/Mac, how do you get
the EOL for *another* platform?

[ In the end I hard coded them, and left it to the
end user to select the one they wanted! ]

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
"Got no time to pack my bag, my foot's outside the door"
Led Zeppelin 'The Ocean'
.



Relevant Pages

  • Re: Not STD C is "not C" ? ----WAS: Re: C to Java Byte Code
    ... If you are developing for a certain platform, ... piece of so-called software more than I hate Lotus Notes. ... but I was a unix developer for years. ... But I'm fine with Windows, ...
    (comp.lang.c)
  • Re: Not STD C is "not C" ? ----WAS: Re: C to Java Byte Code
    ... If you are developing for a certain platform, ... piece of so-called software more than I hate Lotus Notes. ... but I was a unix developer for years. ... But I'm fine with Windows, ...
    (comp.programming)
  • Re: Not STD C is "not C" ? ----WAS: Re: C to Java Byte Code
    ... If you are developing for a certain platform, ... piece of so-called software more than I hate Lotus Notes. ... but I was a unix developer for years. ... But I'm fine with Windows, ...
    (comp.lang.cpp)
  • Re: Not STD C is "not C" ? ----WAS: Re: C to Java Byte Code
    ... If you are developing for a certain platform, ... piece of so-called software more than I hate Lotus Notes. ... but I was a unix developer for years. ... But I'm fine with Windows, ...
    (comp.unix.programmer)
  • Re: where for interop questions?
    ... > purposes meaning between all Unix and all Windows variants) code could ... One strategy is to ask in the silo that discusses your target platform. ... Another strategy is to find one of the on-line migration documents ... used to port from Windows to Linux). ...
    (comp.unix.programmer)