Editing a Page with the Proper Encoding


Once a file is encoded, it's not always easy to figure out which encoding was used. Some editors, like BBEdit, use the meta declaration, if present, to try to figure it out. Others are not so savvy. A good text editor will let you manually choose the proper encoding.

To edit a page with the proper encoding:

1.

Choose File > Open in your text editor.

2.

Select your file.

3.

Choose the appropriate option for decoding an encoded file.

In BBEdit, choose the proper encoding from the Read As pop-up menu (but see tip).

In Word, choose Encoded Text from the Files of type box (and note tip) and then choose the encoding from the box that appears.

4.

Click OK or Open.

Figure 21.12. This document was saved without a charset meta declaration with the Latin 1 encoding. Since this file was not originally created in BBEdit, BBEdit couldn't tell what encoding it had and used the default, which was unfortunately not the right choice.


Figure 21.13. BBEdit lets you manually choose the encoding you think the file was saved with.


Tips

  • If you open the file and see garbage, close it without saving and try again with a different encoding.

  • Unless you tell it otherwise, BBEdit uses the encoding declared in the meta tag to open the file, or in its absence, the information it saved if you created the file in BBEdit, or as a last resort, the default encoding set in the Text Files: Opening preferences.

  • You have to make Word ask you for the proper encodingchoose Tools > Options, click the General tab, and check "Confirm Conversion at Open"otherwise it uses your system's default encoding.


Figure 21.14. Once you've chosen the correct encoding, the characters beyond ASCII are displayed properly.





HTML, XHTML, & CSS(c) Visual QuickStart Guide
HTML, XHTML, and CSS, Sixth Edition
ISBN: 0321430840
EAN: 2147483647
Year: 2004
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net