ID: 43360
Updated by: kalle@php.net
Reported By: volka at cs dot tu-berlin dot de
-Status: Open
+Status: Closed
Bug Type: Translation problem
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
I belive this was fixed with recent updates to this bug.
Previous Comments:
------------------------------------------------------------------------
[2007-11-21 15:03:32] volka at cs dot tu-berlin dot de
Description:
------------
http://de2.php.net/manual/en/function.nl2br.php> Returns string with '<br />' inserted before all newlines.http://de2.php.net/manual/de/function.nl2br.php> Gibt den string mit einem vor allen Neue-Zeile-Zeichen eingefügten> '<br />' zurück.
nl2br() recognizes \n (line feed), \r (carriage) and \r\n. That's why
the english description says "newline" and not "newline character" as
the german translation does which is a bit misleading as you would
expect \r\n to become \r<br />\n or <br />\r<br />\n.
Should be something like:
Gibt die Zeichenkette mit einem eingefügten <br /> vor jedem
Zeilenumbruch (\n, \r oder \r\n) zurück.
Reproduce code:
---------------
<?php
$s = nl2br("\r\n");
for($i=0; $i<strlen($s); $i++) {
printf('%s %02X ', $s[$i], ord($s[$i]));
}
Actual result:
--------------
< 3C b 62 r 72 20 / 2F > 3E
0D
0A
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43360&edit=1