ID:               26427
 Updated by:       [EMAIL PROTECTED]
 Reported By:      phpbug at lapage dot com
-Status:           Open
+Status:           Assigned
-Bug Type:         Output Control
+Bug Type:         Filesystem function related
 Operating System: Win98
 PHP Version:      4.3.2
-Assigned To:      
+Assigned To:      wez
 New Comment:

Assigned to the father of this mode..



Previous Comments:
------------------------------------------------------------------------

[2003-11-26 11:06:28] phpbug at lapage dot com

Description:
------------
Writing in text-mode does not play nicely with heredoc, in Win32.  Line
endings become \r\r\n in the typical situation: php source code with
\r\n endings.

This will break, for example, batch files written for Win98.

Reproduce code:
---------------
$fp= fopen('file.txt', 'wt');
fwrite($fp, <<<ENDTEXT
One line of text
Another line of text
Last line of text\n
ENDTEXT
);
fclose($fp);


Expected result:
----------------
One line of text\r\n
Another line of text\r\n
Last line of text\r\n


Actual result:
--------------
One line of text\r\r\n
Another line of text\r\r\n
Last line of text\r\n


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=26427&edit=1

Reply via email to