On Thu, 02 Sep 2004 01:08:20 -0400, John Holmes <[EMAIL PROTECTED]> wrote:

Curt Zirzow wrote:

$fixed = preg_replace("/(\r?\n)|\r/",'<br />',$oldstring);
 on retrosopect.. reading into that regex i get:
 unix: sets the standard to use \n
windows: can't really decide on \r or \n so just uses them both
mac: goes oposite of everybody and used \r instead.
 It seems OS's can simply be described on how they treat EOL, all the
rest of the differences are side effects of this behaviour.

Yeah, of course... Think of how secure windows would be if they just used \n! ;)



It certainly could be more stable. I've seen badly coded programs which ignore that the line terminator is two bytes and try to stick strings in blocks of mem one byte too small as a result. Its not common, but every little thing has an effect :P


--

Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to