Home > Web Front-end > JS Tutorial > JavaScript character encoding rules_javascript skills

JavaScript character encoding rules_javascript skills

WBOY
Release: 2016-05-16 18:53:26
Original
954 people have browsed it

[escape]
ISO Latin character set encodes the specified string, characters that will not be encoded [ @ * / ]
[encodeURI]
UTF-8 character set encodes the specified string
[encodeURIComponent]
UTF-8 character set encodes the specified string, [supports more characters]
When the source and target pages are both in the same character set, there is no need to convert to UTF -8, [escape] can be used at this time
When the source and target page character sets are different, the source characters need to be converted into target characters. For unification, consider using UTF-8
new String(request.getParameter(" PARAM_NAME").getBytes("Source page encoding"), "UTF-8")

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template