|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: volka at cs dot tu-berlin dot de
New email:
PHP Version: OS:


 [2007-11-21 15:03 UTC] volka at cs dot tu-berlin dot de
> Returns string with '<br />' inserted before all newlines.
> 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:
$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  


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-20 15:32 UTC]
I belive this was fixed with recent updates to this bug.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 12:03:35 2021 UTC