DOS/Windows uses 2 characters for a new line (crlf) and Unix only one (lf).  
You could use a regex to substitute chr(10) for all occurrences of chr(10) that 
are immediately followed by chr(12).

Maybe your script can use \x0A for line breaks instead of \n

Bj
> 
> From: "Mark Mandel" <[EMAIL PROTECTED]>
> Date: 2006/05/25 Thu PM 11:54:27 GMT
> To: [email protected]
> Subject: [wdvltalk] JavaScript substring and linebreaks on IE & Firefox bug..
> 
> Hi,
> 
> I've got a small test bed here to show this:
> http://users.cyberone.com.au/markm/substring/
> 
> It seems that when you have linebreaks in a string (i.e. text from a
> textfield), the way that IE handles it, and the way Firefox handles it
> are completley different.  IE Sees \n as 2 chars, whereas Firefox has
> \n as one char..
> 
> This seems to be the case for both substr(), and substring().
> 
> Has anyone ever encountered this before? and if so, what was your solution?
> 
> I actually need IE to look at \n as one character, as that is the way
> Java does it, and I am passing a string through a Java service.
> 
> We're starting to experiment with using regex's to do it, but this
> seems like overkill to me.
> 
> Any thoughts?
> 
> Cheers,
> 
> Mark
> 
> --
> E: [EMAIL PROTECTED]
> W: www.compoundtheory.com
> ICQ: 3094740
> 
> ____ • The WDVL Discussion List from WDVL.COM • ____
> To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
> use the web interface http://e-newsletters.internet.com/discussionlists.html/
>        Send Your Posts To: [email protected]
> To change subscription settings, add a password or view the web interface:
> http://intm-dl.sparklist.com/read/?forum=wdvltalk
> 
> ________________  http://www.wdvl.com  _______________________
> 
> You are currently subscribed to wdvltalk as: unknown lmsubst tag argument: ''
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> To unsubscribe via postal mail, please contact us at:
> Jupitermedia Corp.
> Attn: Discussion List Management
> 475 Park Avenue South
> New York, NY 10016
> 
> Please include the email address which you have been contacted with.
> 

-----------------------------------------
Email sent from www.ntlworld.com
Virus-checked using McAfee(R) Software 
Visit www.ntlworld.com/security for more information


____ • The WDVL Discussion List from WDVL.COM • ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
       Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to