The difference between pageencoding and CharSet

Source: Internet
Author: User
Pageencoding is the encoding of the JSP file itself

ContentType CharSet refers to the content encoding when the server is sent to the client

JSP to pass two times "coding", the first stage will use Pageencoding, the second stage will use Utf-8 to Utf-8, the third stage is the Web page from Tomcat, with the ContentType.

The first stage is that the JSP is compiled into. Java, which reads the JSP according to the pageencoding setting, and the result is translated by the specified encoding scheme into a unified UTF-8 Java source code (ie. java), if the pageencoding set wrong, or not set, out of the Chinese garbled.

The second stage is compiled by Javac Java source code to Java bytecode, no matter what coding scheme is used when JSP is written, the result of this stage is all UTF-8 encoding Java source code.

The difference between pageencoding and CharSet

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.