Application of HTTP header Accept-charset

Source: Internet
Author: User
The use of HTTP header accept-charset?
Accept-charset accept-encoding accept-language in HTTP headers do they work much? Feel the Content-type function is very big.
A program that encounters a person with an easy-to-write page that returns HTML code. Then he came across a problem that came back to the Chinese is garbled. Later, a function converted to UTF-8 encoding was used to solve the problem. Later I thought I could solve this problem by setting some messages inside the HTTP protocol header. Found some information about the HTTP protocol on the Internet. Accept-charset accept-encoding Accept-language Client declares the character set. Coding. Some information about the language. But feeling no matter how the setting seems to have little effect. I don't know if I didn't have the whole right. So let me ask you guys a little bit.

------Solution--------------------
The request header Accept-charset is the encoding that tells the server that the form that the client submits may use. This is independent of the response content encoding of the server.
The charset in the response header Content-type will tell the browser what encoding the text is returned by the server, which is the key.

------Solution--------------------
discuss

The request header Accept-charset is the encoding that tells the server that the form that the client submits may use. This is independent of the response content encoding of the server.
The charset in the response header Content-type will tell the browser what encoding the text is returned by the server, which is the key.

------Solution--------------------
Accept-charset: The browser affirms its own character set, which is the various character sets and character encodings described earlier in this article, such as gb2312,utf-8 (usually we say Charset includes the corresponding character encoding scheme); Why is it different on the Internet?

Upstairs, it's in the form.

, huh?

But this parameter is really useless in the request header.
------Solution--------------------
CHARACTER_SET Specifies the character set accepted by the Server for processing form data
One or more character sets that the server can handle, separated by commas, provided the server supports these character sets, ie does not support
[Do not advocate using this property] Iso-8859-1 is latin1.
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.