PHP 4.0 Bug #9282: printint chr(0x0a) in a file generate 0x0d 0x0a

From: Date: Thu, 15 Feb 2001 15:36:48 +0000
Subject: PHP 4.0 Bug #9282: printint chr(0x0a) in a file generate 0x0d 0x0a
Groups: php.dev 
Request: Send a blank email to php-dev+get-46665@lists.php.net to get a copy of this message
From: Olivier.Ziller@univ-nancy2.fr Operating system: Win32 PHP version: 4.0.4pl1 PHP Bug Type: Unknown/Other Function Bug description: printint chr(0x0a) in a file generate 0x0d 0x0a look at the following code : <? $s = chr(0x0a); print strlen($s); $fp =fopen("test.txt","w"); fwrite($fp,$s,1); fclose($fp); ?> the output on screen is 1(strlen($s)) but in my file, i get always 0x0d 0x0a. With Unix, i get only 0x0a in my file. -- Edit Bug report at: http://bugs.php.net/?id=9282&edit=1

« previous php.dev (#46665) next »