Java.net.Decoder with java.net.Encoder solve URL parameter chinese garbled problem "2014-11-17"

Source: Internet
Author: User

1. Decoding rules

Explain: Decoding rules correspond to coding rules, similar to symmetric encryption algorithm

Decoding rules: 1, numbers and letters remain the same;

2, ".", "-", "_", "*" remain the same; "+" is decoded as "" (Empty One-cell string);

3,%xy decoding according to decoding code;

2. Decoding method

Explain: The decoding method and coding method are almost

2 Methods: Decode (string s) and decode (string s,string Enc)

Decode (String s) is deprecated because it is decoded by the default encoding of the platform and relies on the platform

Decode (String s,string ENC) is recommended to use encoding corresponding encoding method for decoding, the consortium recommends encoding and decoding are used UTF-8


The above is i solve the URL parameter with Chinese Method!

The following are garbled and correct:

Garbled:

That's right:



Java.net.Decoder with java.net.Encoder solve URL parameter chinese garbled problem "2014-11-17"

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.