I just had to deal with this problem. Just replace "\r\n" with "\n".
myText.replace("\r\n", "\n");
Jamie
On Tue, Feb 26, 2008 at 2:55 PM, Maciek Sakrejda <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
> We have a TextArea that displays text pulled in from a database. That
> text uses Windows line endings: \r\n. The TextArea seems to display a
> line break for \r and another for \n. Is there any way around this?
> Ideally, we'd like to handle heterogeneous line endings gracefully
> (i.e., detect whether a file uses \n or \r\n, and act accordingly).
>
> Any suggestions?
>
> Thanks,
> --
> Maciek Sakrejda
> Truviso, Inc.
> http://www.truviso.com
>
>