Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies


carriage returns?



1:33 am on Feb 25, 2009 (gmt 0)

5+ Year Member

I create my web pages in Dreamweaver on an Intel Mac. Pull the files to my PC for viewing in IE 7. Any minor adjustments I make using Notepad, save and put back on the Mac. I view the Notepad files fine on the PC and Dreamweaver opens them without a problem - been doing this over a year.
Now I have a client who works on the pages making a small adjustment to the quantity of a product - page is fine (online and View Source through IE is correct), but when I download and view on Notepad I have scrambled characters - am assuming are carriage returns.

At first I thought it was the client using something different to open. Then I tested my own pages and found the same to be true.

While I CAN correct this by opening in Word, Save As and then return to Notepad - I would like to gain some understanding of "why".

Does it have to do with Dreamweaver setting the "charset=UTF-8" (see below). If so, is this what I want, or should I change this preference? It views fine in IE on PCS and on Macs through Safari and Firefox. Thanks.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


1:35 am on Feb 25, 2009 (gmt 0)

5+ Year Member

I forgot to clarify: I get the screwy notepad when I download my own pages via ftp , otherwise they are fine on my hard drive. NOT after I download them.


1:46 am on Feb 25, 2009 (gmt 0)

5+ Year Member

One possible solution

When saving files, set the Encoding to UTF-8 rather than ANSI

ANSI, Unicode, UTF-8, and the path of most resistance!
Advanced Unicode Questions


2:40 am on Feb 25, 2009 (gmt 0)

5+ Year Member

If the lines are all run together (no line breaks) and there are little squares where the linebreaks should be, it probably is due to different line end characters. This isn't due to differences in the charset encoding of the HTML file, but to differences in how different operating systems save linebreaks in text files.

Notepad and Windows use CRLF. I think Linux uses just LF, and I think Mac uses just CR (though I'm less sure of that one).

Word sometimes takes liberties with files being saved, especially HTML, so I wouldn't trust it with that task.

However, you can accomplish the same thing by opening the file in WordPad and saving it. WordPad is less likely to do other weird things to the file.

[edited by: SteveWh at 2:41 am (utc) on Feb. 25, 2009]


3:00 am on Feb 25, 2009 (gmt 0)

5+ Year Member

This makes sense to me as it appears to be what is happening. Once I open in Wordpad (I know not to use Word) and save as a text file html extension It appears normal in Notepad.

All that said would I be better off using BBedit or some other text editor in Windows other than Notepad? Since the code is coming from Dreamweaver will I always have an issue between the two operating systems?
Thanks, agian


9:21 am on Feb 25, 2009 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Also take a look at your ftp clients: they should be able to translate text files like css and html to have the right CR/LF combo on the other side if the transfer is done in ASCII mode vs. BINARY.

Obviously you do not want that ASCII mode for a gif, joeg or png, but you might want it for html.


4:26 pm on Feb 26, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

There's nothing inherently wrong with Notepad or Wordpad, but for editing code you probably want something with syntax highlighting, like Notepad++ or Textpad.

Some background on line termination can be found at [blogs.msdn.com...] .


4:36 pm on Feb 26, 2009 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Many HTML editors have the option to save files with the various line-enders used by Windows and *nix (including Macs). When saving as text files, MS Word also has (or had -- I'm not sure about the most recent versions) the capability to use various line-enders.



7:50 pm on Feb 26, 2009 (gmt 0)

5+ Year Member

Download Notepad++ it's a fantastic little editor designed for programmers, it also automatically handels the unix end of line character which I suspect what your problem is.
[notepad-plus.sourceforge.net ]

Remember to select the current programming language you are using under the menu entry "Language"



9:04 pm on Feb 26, 2009 (gmt 0)

5+ Year Member

It is still odd:
I create in Dreamweaver UTF-8 charset - pull to PC, view the file in IE7, view the Notepad code - NO change to code, upload, then download and view the code. (Upload ASCII and download same)

I now see all the screwy carriage returns, again. I have used 2 different ftp programs with the same results.

At this point, just hoping to know the "why".
Thanks, again


11:47 pm on Feb 26, 2009 (gmt 0)

5+ Year Member

ASCII transfer mode requires the server and client both know what their proper line endings are, and if either one is wrong, hoo-boy! That said, most any editor other than Notepad can handle the various types of line endings without difficulty, so if ASCII transfer mode is causing problems, why not use BINARY for everything?


8:20 pm on Mar 5, 2009 (gmt 0)

5+ Year Member

I use Free product from Microsoft :-V isual Web Developer, works good, can view online files, edit them, all fine.

Featured Threads

Hot Threads This Week

Hot Threads This Month