Differences

This shows you the differences between the selected revisions of the page.

faq_line_breaks 2019-09-30 faq_line_breaks 2023-10-06 (current)
Line 20: Line 20:
WinSCP by default uses the binary transfer mode for all //regular file transfers//. Learn how to configure it to [[transfer_mode#changing|use the text/ASCII transfer mode]]. You may also need to configure [[ui_login_environment|correct server-side text file format]]. WinSCP by default uses the binary transfer mode for all //regular file transfers//. Learn how to configure it to [[transfer_mode#changing|use the text/ASCII transfer mode]]. You may also need to configure [[ui_login_environment|correct server-side text file format]].
-On the contrary, WinSCP always uses text transfer mode, when //editing file// in WinSCP internal editor or Windows Notepad. If you want to force WinSCP to use the binary mode when editing files, you have to use an external text editor ((WinSCP internal editor does not support Unix file format.)) and make sure WinSCP [[ui_editor_preferences#external|does not force text mode for edited files]]. Also make sure your external text editor saves the file in the format you need. ((Most text editors nowadays support different text file formats, not just a format native to the platform the editor runs on.))+On the contrary, WinSCP always uses text transfer mode, when //editing file// in WinSCP internal editor (or Windows Notepad on Windows versions older then Windows 10 1809). If you want to force WinSCP to use the binary mode when editing files, you have to use an external text editor ((WinSCP internal editor does not support Unix file format.)) and make sure WinSCP [[ui_editor_preferences#external|does not force text mode for edited files]]. Also make sure your external text editor saves the file in the format you need. ((Most text editors nowadays support different text file formats, not just a format native to the platform the editor runs on.))
===== [[known_issues]] Known Issues with Transfer Mode ===== ===== [[known_issues]] Known Issues with Transfer Mode =====
Line 26: Line 26:
  * Pure-FTPd FTP server: When downloading a file with Windows line-endings (CR+LF) in a text/%%ASCII%% mode, the server replaces LF with CR+LF, resulting in an incorrect CR+CR+LF. When opening such file in an Internal editor of WinSCP, the editor interprets the sequence as two line endings (CR and CR+LF) resulting in a blank line after each and every content line. When the file is saved, the internal editor saves two Windows line endings CR+LF and CR+LF. On upload they get converted to two LF's. A workaround is to use an external editor and make sure WinSCP [[ui_editor_preferences#external|does not force text mode for edited files]].   * Pure-FTPd FTP server: When downloading a file with Windows line-endings (CR+LF) in a text/%%ASCII%% mode, the server replaces LF with CR+LF, resulting in an incorrect CR+CR+LF. When opening such file in an Internal editor of WinSCP, the editor interprets the sequence as two line endings (CR and CR+LF) resulting in a blank line after each and every content line. When the file is saved, the internal editor saves two Windows line endings CR+LF and CR+LF. On upload they get converted to two LF's. A workaround is to use an external editor and make sure WinSCP [[ui_editor_preferences#external|does not force text mode for edited files]].
-===== Debugging Text File Conversion =====+===== [[debugging]] Debugging Text File Conversion =====
If enabling (or disabling) text/ASCII transfer mode does not help with the problem and your transferred/edited file is still perceived incorrectly by the target system, you need to find out in what step the file got converted incorrectly (or haven't got converted). If enabling (or disabling) text/ASCII transfer mode does not help with the problem and your transferred/edited file is still perceived incorrectly by the target system, you need to find out in what step the file got converted incorrectly (or haven't got converted).

Last modified: by martin