#43360 [Opn->Csd]: [DE] imprecision in german nl2br documentation

From: Date: Fri, 20 Nov 2009 15:32:51 +0000
Subject: #43360 [Opn->Csd]: [DE] imprecision in german nl2br documentation
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-3297@lists.php.net to get a copy of this message
 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



Thread (1 message)

  • kalle@php.net
  • Unknown Message
    • kalle@php.net
« previous php.doc.bugs (#3297) next »