#27633 [Opn->Csd]: Wrong translation in ASCII mode
| From: | iliaa@php.net | Date: | Thu, 18 Mar 2004 17:07:49 +0000 |
| Subject: | #27633 [Opn->Csd]: Wrong translation in ASCII mode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56628@lists.php.net to get a copy of this message | ||
ID: 27633
Updated by: iliaa@php.net
Reported By: vrana@php.net
-Status: Open
+Status: Closed
Bug Type: FTP related
Operating System: Windows XP
PHP Version: 4.3.5RC3
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-03-18 07:27:30] vrana@php.net
Description:
------------
ftp_get() translates \n characters wrong in FTP_ASCII mode. Instead of
\r\n, they become \r on Windows. Only newline at the end of a file (if
any) is translated correct.
\r\n on remote server become \r\r.
Reproduce code:
---------------
<?php
$ftp = ftp_connect("ftp.netscape.com");
ftp_login($ftp, "anonymous", "anonymous");
ftp_pasv($ftp, true);
ftp_get($ftp, "Welcome", "Welcome", FTP_ASCII);
ftp_close($ftp);
?>
Expected result:
----------------
\r\nWelcome ...\r\n
Actual result:
--------------
\rWelcome ...\r\n
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27633&edit=1