Null Character in File

Advertisement

tchristopher
Joined:
Posts:
2
Location:
USA

Null Character in File

Hi, I'm working on a project where I'm uploading text files via SFTP. The recipient is telling me there is a null character in the file which in turn fails their validation.

I've already tried both text and binary transfer modes but still have the same issue.

Here is a screenshot the recipient sent me.



Looking for suggestions. Thank you!!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
33,467
Location:
Prague, Czechia

Re: Null Character in File

I do not think that WinSCP adds that. Did you try uploading the file using any other SFTP client? It might be at their end.

If you want to us to investigate further, please attach a full session log file on Debug 2 log level.

Btw, the FFFE is UTF-16 Byte-order mark (BOM):
https://en.wikipedia.org/wiki/Byte_order_mark#UTF-16

Actually, isn't it the other way around? The BOM might actually be in your source file (it's not visible in your editor – the editor adds it while saving the file). It might be the email client that strips the BOM when sending (or when receiving at their end).

Reply with quote

tchristopher
Joined:
Posts:
2
Location:
USA

martin, thanks for the reply. I did find that the files I was uploading were UTF-16. I changed encoding to UTF-8 and the issues were resolved.

This was not a WinSCP issue.

Thanks!

Reply with quote

Advertisement

You can post new topics in this forum