Base de Conhecimento

  1. Início
  2. Problems
  3. Strange characters in uploaded text files
Criado
Modificado

Artigo 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.

Palavras-chave

Artigos Relacionados


What do you think about this topic? Send feedback!