php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43360 [DE] imprecision in german nl2br documentation
Submitted: 2007-11-21 15:03 UTC Modified: 2009-11-20 15:32 UTC
From: volka at cs dot tu-berlin dot de Assigned:
Status: Closed Package: Translation problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
 [2007-11-21 15:03 UTC] 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  

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-20 15:32 UTC] kalle@php.net
I belive this was fixed with recent updates to this bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 12:01:30 2024 UTC