Re: PHP 4.0 Bug #6079 Updated: "\n" evaluates to LF (0x0a) on Win32 (should be CRLF)
| From: | Bjoern Hoehrmann | Date: | Thu, 10 Aug 2000 09:48:59 +0000 |
| Subject: | Re: PHP 4.0 Bug #6079 Updated: "\n" evaluates to LF (0x0a) on Win32 (should be CRLF) | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-28404@lists.php.net to get a copy of this message | ||
* "Bug Database" <php-dev@lists.php.net> wrote:
| \n is one character and always was.
Ok. Bad example, i see.
Then lets do
C:\>php >out
<? print "\n";
^Z
Last bytes of 'out' are
74 6d 6c 0d 0a 0d 0a 0a
This is 'tml<CR><LF><CR><LF><LF>'
^^^^ This should be <CR><LF> under windows
If i do the same with perl:
C:\>perl >out
print "\n";
^Z
The two bytes in the file are 0d 0a (<CR><LF>).
Perl is correct, PHP is not.
regards,
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://www.bjoernsworld.de
am Badedeich 7 · Telefon: +49(0)4667/981ASK · http://bjoern.hoehrmann.de
25899 Dagebüll · PGP KeyID: 0xA4357E78 · http://learn.to/quote <---