Three text errors

Source: Internet
Author: User
ArticleDirectory
  • Syntax
  • Return Value
  • Description
Recently, I am bored and found that garbled characters may occur when the URL in UTF-8 encoding format passes an odd number of Chinese characters on the JSP page. There are some solutions for Google on the Internet.
Because I put the URL together in Javascript, it's okay to use encodeuricomponent.
The specific usage is as follows (copy ):

Definition and usage

The encodeuricomponent () function can encode a string as a URI component.

Syntax
Encodeuricomponent (uristring)
Parameters Description
Uristring Required. A string containing the URI component or other text to be encoded.
Return Value

A copy of uristring, some of which will be replaced by the hexadecimal escape sequence.

Description

This method does not encode ASCII letters and numbers, and does not encode these ASCII punctuation marks :-_.! ~ *'().

Other characters (such :;/? : @ & =+ $, # The punctuation marks used to separate URI components) are all replaced by one or more hexadecimal escape sequences.

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.