uploaded files have extra newlines |
Site Admin
|
It was discussed many times there.
PhpED does never insert any newlines when it performs file transfers. Most probably your files are in Windows format (0x13, 0x10 as line ending) and you've turned on ASCII transfer mode. In this case some ftp servers don't recognize the file format. They replace both 0x13 and 0x10 with 0x10. As a result you see the newlines doubled. I'd highly recommend to select binary transfer mode in the account settings. |
||||||||||||
_________________ The PHP IDE team |
|
I can't find in PHPed 5.5 where I can enable binary/ASCII transfer mode. Searching the help files produced nothing. There's no options in the account settings. I did some packet capturing on PHPed's FTP client, and it looks like it sets the mode to Binary (I) mode for transfers, which skips win/unix CRLF conversion at the FTP server, but I guess it would depend on the server. Both of the FTP clients I tested (winSCP, Filezilla) transferred the same file to the same server as ASCII. There should really be a way to force PhpED to use ASCII mode... is there?
|
||||||||||||||||
|
Site Admin
|
If your FTP server adds extra CR-LF even when transfer mode is set to binary, it's definitely broken and I'd highly recommend you to switch to another server like ProFTPD, vsftpd, or wuftpd as they all are known to work fine, at least in their recent versions.
|
||||||||||||
_________________ The PHP IDE team |
|
That is a non-solution. I work with lots of different FTP servers and am not able to change settings on them much less install different FTP daemons.
ASCII is the default transfer mode as required by RFC 959 (3.1.1.1). The ASCII transfer mode converts Windows' CRLF to UNIX's LF characters. It does change the file contents, but this is a feature and desired. PHPed needs the ability to transfer text files in ASCII mode, or set transfer mode by extension, like other FTP clients. |
||||||||||||
|
Site Admin
|
You right, ASCII is the default mode but we do not use it just because in this mode the file content IS changed and it is NOT what we want. We want the file to remain UNCHANGED, WITHOUT any extra line endings. That's why we always use BINARY mode.
If your server CHANGES the files in this mode, just don't use it our use only UNIX file endings. PhpED does recognize the line endings: 0x0D, 0x0A - as Windows 0x0A - as Unix 0x0D - as Mac all other possible combinations may cause unexpected results. Please DO CHECK the file content on the server before downloading it. If it is with BROKEN line endings, don't blame at us
This is a good theory. In practice many old Unix ftp servers does not handle Windows line endings at all or corrupt them. |
||||||||||||||
_________________ The PHP IDE team |
uploaded files have extra newlines |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by