Which charset html




















Some people would argue that it is rarely appropriate to declare the encoding in the HTTP header if you are going to repeat it in the content of the document. In this case, they are proposing that the HTTP header say nothing about the document encoding. Note that this would usually mean taking action to disable any server defaults. XML parsers do not recognise the encoding declarations in meta elements. They only recognise the XML declaration.

Here is an example:. The XML declaration is only required if the page is not being served as UTF-8 or UTF , but it can be useful to include it so that developers, testers, or translation production managers can visually check the encoding of a document by looking at the source. On the other hand, if the file is to be read as HTML you will need to declare the encoding using a meta element, the byte-order mark or the HTTP header.

If you use the meta element with a charset attribute this is not something you need to consider. The information in this section relates to things you should not normally need to know, but which are included here for completeness. Using UTF-8 not only simplifies authoring of pages, it avoids unexpected results on form submission and URL encodings, which use the document's character encoding by default.

If you really can't avoid using a non-UTF-8 character encoding you will need to choose from a limited set of encoding names to ensure maximum interoperability and the longest possible term of readability for your content. Until recently the IANA registry was the place to find names for encodings.

The IANA registry commonly includes multiple names for the same encoding. In this case you should use the name designated as 'preferred'.

The new Encoding specification now provides a list that has been tested against actual browser implementations. You can find the list in the table in the section called Encodings. It is best to use the names in the left column of that table. Note , however, that the presence of a name in either of these sources doesn't necessarily mean that it is OK to use that encoding.

Several of the encodings are problematic. While using W3Schools, you agree to have read and accepted our terms of use , cookie and privacy policy.

Copyright by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3. Your message has been sent to W3Schools. W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content.

While using this site, you agree to have read and accepted our terms of use , cookie and privacy policy. Most modern charsets use it as a standard base. It has been developed from telegraph code in the early s and contains characters , 95 of which are printable :. The 33 unprintable characters are also called control characters. These are the transparent symbols — e. Only supporting Latin characters quickly became not enough.

Unicode is the industry standard used for the consistency of character encoding.



0コメント

  • 1000 / 1000