Corrupt text file after SFTP transfer using ASCII mode

Advertisement

RicOChet
Joined:
Posts:
2

Corrupt text file after SFTP transfer using ASCII mode

WinSCP Version 5.9.6 (Build 7601) (OS 6.3.9600 - Windows Server 2012 R2 Standard)
Uploading using SFTP and ASCII (explicitly)

Intermittently, but more often than not, text files that are transferred will have alternating lines of chinese characters (sample attached). This has happened with different text files sent to separate clients/servers. It has also happened using different scripts (VBScript and Powershell) and using the GUI. Source files are plain text and transfer without issue using FileZilla.

Sample file and log file attached. Any thoughts?
  • TransferLog_clean.txt (12.77 KB, Private file)
Description: Session log.
  • TransferedFile_sample.txt (6.25 KB, Private file)
Description: Sample after transfer. All lines should be 'plain text'.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Corrupt text file after SFTP transfer using ASCII mode

So you upload a file in a text mode and download it back in a binary mode and the file is corrupted after the download?
Please attach the original of the file. And also a session log file on Debug 2 log level (for a session that corrupted the file).

Reply with quote

RicOChet
Joined:
Posts:
2

Re: Corrupt text file after SFTP transfer using ASCII mode

martin wrote:

So you upload a file in a text mode and download it back in a binary mode and the file is corrupted after the download?
Please attach the original of the file. And also a session log file on Debug 2 log level (for a session that corrupted the file).

Thanks, Martin. When the text file is uploaded, in ascii mode, I right-click on the file and 'Edit' using notepad++. This shows the corruption (see attached sample of before and after). Same is true if I drag the file back to the local system and edit it. Client is also reporting that they are seeing the same corruption.

Attached are before and after sample files and a debug (level-2) log.

Per the client on the receiving end, they provided the following:
FileZilla Client
----------------

Version: 3.28.0

Build information:
Compiled for: x86_64-w64-mingw32
Compiled on: x86_64-pc-linux-gnu
Build date: 2017-09-29
Compiled with: x86_64-w64-mingw32-gcc (GCC) 6.3.0 20170516
Compiler flags: -g -O2 -Wall

Linked against:
wxWidgets: 3.0.4
SQLite: 3.19.3
GnuTLS: 3.5.13

Operating system:
Name: Windows 10 (build 15063), 64-bit edition
Version: 10.0
Platform: 64-bit system
CPU features: sse sse2 sse3 ssse3 sse4.1 sse4.2 avx avx2 aes pclmulqdq rdrnd bmi2 bmi2 adx
Settings dir: C:\Users\nagarjun\AppData\Roaming\FileZilla\
  • test_ERCS_HOURS_20171128_3_clean_uploaded.txt (3.32 KB, Private file)
Description: After the upload
  • test_ERCS_HOURS_20171128_3_clean.txt (3.32 KB, Private file)
Description: Original file
  • WinSCP_Debug2_clean.log (269.82 KB, Private file)
Description: Log file.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Corrupt text file after SFTP transfer using ASCII mode

OK, but I need a log file for the upload too. Ideally on log level Debug 2.
Also, you compare WinSCP to FileZilla, but afaik, FileZilla does not support ascii mode with SFTP protocol.
Btw, the file has UTF-16 encoding. WinSCP does not support ascii mode transfer with UTF-16 encoding. So that can be the problem. Though I cannot reproduce your problem.

Reply with quote

Advertisement

You can post new topics in this forum