Differences

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

faq_line_breaks 2020-06-24 faq_line_breaks 2023-10-06 (current)
Line 16: Line 16:
===== Text/ASCII Transfer Mode ===== ===== Text/ASCII Transfer Mode =====
-For this reason, file transfer clients and servers support a text/ASCII [[transfer_mode|transfer mode]].  +For this reason, file transfer clients and servers support a text/ASCII [[transfer_mode|transfer mode]]. When transferring a file in this mode, the file gets (ideally) converted from a format native to a source system, to a format native to a target system. For example, when uploading a text file using text mode from Windows to Unix system, the file line endings get converted from CR+LF to LF. Opposite to the text/%%ASCII%% transfer mode is a binary transfer mode that transfer the file as is (binary identical).
-When transferring a file in this mode, the file gets (ideally) converted from a format native to a source system, to a format native to a target system. For example, when uploading a text file using text mode from Windows to Unix system, the file line endings get converted from CR+LF to LF. Opposite to the text/%%ASCII%% transfer mode is a binary transfer mode that transfer the file as is (binary identical).+
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 27: 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 216.104.81.200 – Currently locked by: 89.187.177.13 (172.245.80.0, 156.146.38.0, 156.146.38.0)