Re: ^M's being inserted at line end
by "Ben Z. Tels" <optimusb(at)stack.nl>
|
Date: |
Thu, 30 Apr 1998 19:59:22 +0200 |
To: |
<hwg-software(at)hwg.org>, "Judith Berman" <webmaster(at)katsation.com> |
|
todo: View
Thread,
Original
|
|
The problem is between UNIX and the Microsoft OS'es.
DOS' and the different Windows' charachter sets encode a line break as
<CR><LF>, two characters.
UNIX systems encode line breaks by a single <LF>. So on UNIX, if you
transmit it a <CR><LF>, it gets read as <CR>
newline.....
And the <CR> shows up as ^M.
The cure, when uploading, is to make sure you are transmitting the textfile
as an ASCII file. There is a set of radio buttons in WS_FTP to choose
between ASCII and binary transmission. Make sure to use ASCII for text.
You can also access the configuration of WS_FTP through the options button;
on the extensions tab, you can set a list of file extensions, whose attached
files will automatically be transmitted as ascii files. It might be useful
to add .html and .htm to that list, so you cannot forget to transmit them as
ascii.
Ben Z. Tels
optimusb(at)stack.nl
http://www.stack.nl/~optimusb/
"The Earth is the cradle of the mind, but one cannot stay in the cradle
forever."
--Tsiolkovsky
-----Original Message-----
From: Judith Berman <webmaster(at)katsation.com>
To: hwg-software(at)hwg.org <hwg-software(at)hwg.org>
Date: donderdag 30 april 1998 19:40
Subject: ^M's being inserted at line end
>Hello all,
>I am not a member of this list, so please cc: any answers or ideas which
>you may have.
>What causes might be causing "^M" to show up?
>
>I use Notepad to edit.
>The files are downloaded(ws_ftp95) in ASCII format from a UNIX server
>OR cut and pasted from the actual web page
>OR cut and pasted from view source in Netscape 3.01 to notepad,
>onto my windows 95 machine. Edited with notepad, saved, and then uploaded
>in ASCII format to the server again.
>
>If someone uses VI to edit these files on the server there are ^M's all
>over the place, these are causing server 500 error messages when the files
>are of CGI or CFG extension. She then downloads the files, opens and saves
>them with Homesite and all the ^M's disappear.
>
>Now what is strange is that the ^M's do not show up in every file I edit,
>but we have determined that at least in the first case they do show up.
>Sometimes the files are zipped and uploaded from someone else's computer,
>could the computer in between be causing the ^M's? I was sending them to
>one person and now I'm sending them to another person and this problem
>seems to be only in files which she uploads.
>
>Sorry this was so long, I wanted to cover the bases and fully explain what
>was happening... the tools involved etc..
>Thanks in advance for any insight you all maybe able to give.
>Judy
>
>
HWG: hwg-software mailing list archives,
maintained by Webmasters @ IWA