Specify encoding in html file
If your document will be opened in a program that does not support Unicode, you can choose an encoding standard that matches that of the target program. For example, Unicode enables you to create a Traditional Chinese language document on your English-language system.
However, if the document will be opened in a Traditional Chinese language program that does not support Unicode, you can save the document with Chinese Traditional Big5 encoding. When the document is opened in the Traditional Chinese language program, all the text is displayed properly. Note: Because Unicode is the most comprehensive standard, saving text in any other encoding may result in some characters that can no longer be displayed.
For example, a document encoded in Unicode can contain Hebrew and Cyrillic text. If this document is saved with Cyrillic Windows encoding, the Hebrew text can no longer be displayed, and if the document is saved with Hebrew Windows encoding, the Cyrillic text can no longer be displayed. If you choose an encoding standard that doesn't support the characters you used in the file, Word marks in red the characters that it cannot save. You can preview the text in the encoding standard that you choose before you save the file.
Text formatted in the Symbol font or in field codes is removed from the file when you save a file as encoded text. In the File Conversion dialog box, select the option for the encoding standard that you want to use:. To use the default encoding standard for your system, click Windows Default. To choose a specific encoding standard, click Other encoding , and then select the encoding standard that you want from the list. Note: You can resize the File Conversion dialog box so that you can preview more of your document.
If you receive a message that states, "Text marked in red will not save correctly in the chosen encoding," you can try to choose a different encoding, or you can select the Allow character substitution check box.
When you allow character substitution, Word replaces a character that cannot be displayed with the closest equivalent character in the encoding that you chose. For example, three dots replace an ellipsis, and straight quotation marks replace curly quotation marks.
If the encoding that you chose has no equivalent character for a character marked in red, the character marked in red will be saved as an out-of-context character, such as a question mark.
If the document will be opened in a program that does not wrap text from one line to the next, you can include hard line breaks in the document by selecting the Insert line breaks check box, and then specifying whether you want the line breaks to be delineated with a carriage return CR , line feed LF , or both, in the End lines with box. Word recognizes several encoding standards, and it supports the encoding standards that are provided with the system software on your computer.
The following list of writing systems shows the encoding standards also called code pages associated with each writing system. Need more help? Join the discussion. Was this information helpful? Yes No. Thank you! Peter Mortensen Jacob de Lacey Jacob de Lacey 1 1 gold badge 4 4 silver badges 12 12 bronze badges.
Add a comment. Active Oldest Votes. You need to replace the HTTP-level header. Improve this answer. Larry K Larry K That looks like it should fix the problem as it comes after the server messes with it but as I no longer have the default. I'm going to assume it would have worked though The default. And I am almost certain that the encoding is correct when I save it as all the other pages on the site are shown as UTF-8 when inspected by Firefox.
The server seems to be doing something special to the default. Charuvind Atre Charuvind Atre 11 1 1 bronze badge. Remove AddDefaultCharset from. I removed that rule from the. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science.
Stack Gives Back If you want to work with a file that you know is encoded in a specific way, you can tell Visual Studio to use that encoding when opening the file.
The method you use depends on whether the file is part of your project. If you want to save the project file with encoding, the Save File As option is not enabled until you unload the project.
In Solution Explorer , right-click the file and choose Open With. Many Visual Studio editors, such as the forms editor, will auto-detect the encoding and open the file appropriately. If you choose an editor that allows you to choose an encoding, the Encoding dialog box is displayed. Click the drop-down button next to the Open button and choose Open With. Skip to main content.
0コメント