知识库

  1. 主页
  2. Problems
  3. Strange characters in uploaded text files
创建日期
修改日期

文章 91

Strange characters in uploaded text files

Problem

Strange characters such as "^M" appear at the end of lines of transferred ASCII files.

Solution

This happens when ASCII files (such as those ending in .html, .htm, .cgi, or .txt) are transferred in binary mode. Perform the transfer in ASCII mode to prevent this from happening.

Most non-PC machines use just a linefeed character to indicate the end of a line in a file. PCs use carriage return and linefeed characters, so the carriage return (^M) remains at the end of every line as an artifact.

You can specify by file extension the file types that should always be transferred in ASCII mode. Auto is the default Data Transfer Type, and sends files in binary mode to and from FTP servers running on MS Windows. For non-Windows servers binary mode is used unless the file matches an entry in the ASCII File List. It is recommended that you leave your Data Transfer Type in Auto. For more information on how to do this, please read the following Knowledge Base article:
KB: ASCII / Binary Mode

You can convert from windows encoding to UNIX encoding using the integrated text editor.

关键字

相关文章


What do you think about this topic? Send feedback!