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