기술 자료

  1. Problems
  2. 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!