Share via


Encoding Dialog Box

Use this dialog box to:

  • Open existing files (for example, .xml, .htm, .asp, .aspx) that are improperly 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 opening a file. If the file is not saved with a Unicode encoding, the Windows system default codepage (determined by your system default locale) will be used. For example, if your Windows system default locale is English, the Save As encoding will default to Windows codepage 1252, the encoding for the Western European language group.

Depending on the task you want to perform, the Encoding dialog box can be accessed in several ways. For more information, see Managing Files with Encoding.

When you open a downloaded HTML file, Visual Studio detects the charset parameter defined in the http meta tag. Visual Studio uses that information to convert the document to Unicode. However, many HTML pages do not include this optional character set attribute in their markup. If the character set attribute is absent or incorrectly defined in the file you want to open, and if the file was created on a machine whose default encoding differs from the one you use, the file's characters will be incorrectly displayed.

If you know the character set used by the author of the target file, you can use the Encoding dialog box to specify that character set. When notified of the HTML file's native character set, Visual Studio converts the file into a form that is readable on your machine. For more information about changing the character set of HTML files, see General, DOCUMENT Property Pages Dialog Box.

  • Encoding
    Use this list box to select an encoding scheme. (Auto-detect) is selected by default.

See Also

Managing Files with Encoding | Globalization and Localization Issues | Character Sets | Open With Dialog Box | New File Dialog Box | General, DOCUMENT Property Pages Dialog Box | Advanced Save Options Dialog Box | Files, User Interface Elements