ASP. NET Encoding

Source: Internet
Author: User

1. Web Page Submission string

A. When the form on the page submits a string, first convert the string to a byte string according to the encoding on the current page,

Then convert each byte into the "% xx" format and submit it to the Web server. For example, a code is gb2312.

When the string is submitted to the server, the content submitted to the server is "% D6 % D0 ",

B. on the server side, the web server converts the received "% D6 % D0" into two bytes: [0xd6, 0xd0,

Then, the "medium" character is obtained based on gb2312 encoding.

C. By default, when "% D6 % D0" is submitted to the server, two Unicode characters [0x00d6, 0x00d0] are returned,

Instead of returning a "medium" character, garbled characters may occur.

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.