JavaScript EditorBest javascript editor debugger     Ajax website 

Main Page

Previous Page
Next Page

Saving Your Page with the Proper Encoding

At the beginning of this book, I said you had to save your Web pages as "text-only" documents, and made little mention of the encoding (see page 46). That's because most of my readers create Web pages and style sheets in the same language as their operating system and because most text editors automatically save files with the default system encoding. You only need to manually choose the encoding as you save if your document contains characters that don't belong to your system's default character encoding.

To save your page with the proper encoding:

When you go to save your document, choose the option for selecting an encoding.

In BBEdit, it's a button called Options.

In Word, it's called Encoded Text, and you'll find it in the Save as type box.

Choose the desired encoding from the list or options that appear (Figure 21.11).

Finish saving the document.

Figure 21.10. In BBEdit, a popular (X)HTML editor for Mac, click the Options button when you go to save your file.

Figure 21.11. Choose the desired encoding from the Encoding pop-up menu. I recommend choosing UTF-8, no BOM (Byte-Order Mark). You should only use an option with BOM if you're using UTF-16 (which needs it). Otherwise, it causes problems with some browsers.


  • Which is the proper encoding? My first choice would be UTF-8. My second choice would be the regional encoding for the main language used on your page. For a list of regional encodings, see

  • When you declare the encoding (see page 330), BBEdit, from version 7 on, automatically saves your file with that same encoding. I love that.

Previous Page
Next Page

JavaScript EditorBest javascript editor debugger     Ajax website