开发者

Weird encoding problem, with 00 added

开发者 https://www.devze.com 2023-03-13 02:22 出处:网络
For some reason, as in picture shown below, my system always adds 00 after each char in the ASCII text file. I can only find this problem when using the binary format view of the text file (e.g. in Ul

For some reason, as in picture shown below, my system always adds 00 after each char in the ASCII text file. I can only find this problem when using the binary format view of the text file (e.g. in UltraEdit). If I just open it using Notepad, everything is ok. But this is a huge problem since if I send this file to another system for processing, 开发者_运维问答they complain it is not a valid file due to all of the 00:

Weird encoding problem, with 00 added

Is it because of some system setting?


That's not an ASCII file. It's a UTF-16 file (at a guess; it seems very likely) - which is what Notepad is detecting, basically.

Either:

  • Change how you're producing the file to actually use ASCII (or potentially UTF-8)
  • Tell the receiving system to read it as UTF-16
0

精彩评论

暂无评论...
验证码 换一张
取 消