Encoding Dialog Box
Updated: December 2009
Use the Encoding dialog box to perform the following actions:
Open existing files (for example, .xml, .htm, .asp, .aspx) that are incorrectly tagged, lack a character-set attribute, or have an encoding that cannot be detected by Visual Studio.
Change the character set of files created or modified in a Visual Studio editor.
Specify a language encoding scheme to apply when a file is opened. If the file is not saved with a Unicode encoding, the system default codepage, which is determined by the system default locale, is used. For example, if the system default locale is English, the encoding will use codepage 1252, which is the encoding for the Western European language group.
The Encoding dialog box can be opened in several ways, depending on the task you want to perform. For more information, see How to: Manage Files with Encoding.
When you open a downloaded .html file, Visual Studio 2008 detects the charset (character set) parameter that is defined in the http meta tag. Visual Studio 2008 uses that information to convert the document to Unicode. However, many HTML pages do not include the optional charset attribute in their markup. If the charset attribute is absent or incorrectly defined in the file that you want to open, and if the file was created on a computer with different default encoding than the encoding on your computer, the characters in the file will display incorrectly.
If you know the character set used by the author of the downloaded file, you can use the Encoding dialog box to specify that character set. When notified of the native character set used in the .html file, Visual Studio 2008 converts the file into a form that is readable on your computer. For more information about how to change the character set of .html files, see HTML Document Properties, Properties Window.