Question about Chinese character encoding in JSP/Servlet
There are many excellent articles and discussions on the issue of DBCS character encoding in JSP/Servlet on the Internet. This article will organize them and combine them with IBM WebSphere Application Server 3.5 (WAS) in the hope that it is not redundant.Content:
Origin?????? -80, GBK, GB18030-2000
There are many articles about the conversion of cstring to char * methods in UNICODE, but most of them are being reproduced from each other. After reading so many materials, the problem of garbled characters is still not solved, later, I found the correct method from a reply to a forum and would like to share it with you.
Summarize the Three conversion methods found on the Internet:
Method 1: Use the setlocale Function
Setlocale (lc_all, "CHS ");
Header file # include
The idea of this method is
1. Chinese character encoding principles
How can we generate Chinese characters at random? Where do Chinese characters come from? Is there a back-end data table that stores all the required Chinese Characters? Can I use a program to randomly retrieve a few
1. Chinese character encoding principlesHow can we generate Chinese characters at random? Where do Chinese characters come from? Is there a back-end data table that stores all the required Chinese Characters? Can I use a program to randomly retrieve a few
Chinese character encoding can be divided into the following types:
Input code: it is an encoding designed to input Chinese characters into a computer using keyboard characters. When you enter English letters, press the key for the characters you enter. The entered code is the same as the internal code. When entering a Chin
In gb2312 encoding, a Chinese character occupies 2 bytes, while in the UTF-8, a Chinese character occupies 3 bytes ". "UTF-8 encoding (in fact a unicode encoding) or Unicode encoding itself is supported, simplified Chinese characters. Traditional
Chinese character | Verification Code | A few days ago to apply for a free QQ number, suddenly found that the application form in the verification code content changed to Chinese, this shouting call me surprised to feel funny, moper cat on the big scold Tencent use Chinese authentication code. ^_^
I have to admire Tenc
When using a URL for parameter passing, some Chinese name arguments or URL addresses are often passed, and conversion errors occur during background processing. In some pass-through pages use GB2312, and the Receive page uses UTF8, so that the received parameters may be inconsistent with the original. URLs that are encoded using the server-side UrlEncode function are not the same as the URLs encoded with the encodeURI function of client JavaScript. Hu
to convert to UTF-8, first, do the above work; then through the search encoding conversion tool, for example, based on the iconv batch conversion tool, convert the original encoding to UTF-8 encoding, note that only the conversion of Java source files, other types of files may already be more appropriate encoding; change text fileencoding from the original project property to the UTF-8.
System. Out. println uses the printstream class to output character
The Chinese character coding problem in Jsp/servlet 1. The origin of the problemEach country (or Region) specifies a set of character encodings for computer information interchange, such as ASCII in the United states, GB2312, China-80, Japan's JIS, etc., As the basis of information processing in the country/region, has the important role of unified coding.
several character sets involved in MySQL
Character-set-server/default-character-set: Server character set, by default.
Character-set-database: Database character set.
Character-set-ta
The Structure Mode of Chinese characters refers to the combination of Chinese Character structural components in a plane. By studying the structure pattern of Modern Chinese characters, we can fully understand the types of internal relations of Chinese
Conversion of cstring to char * in UnicodeOfArticleThere are many, but most of them are being reproduced from each other. After reading so many materials, we still haven't solved the problem of Garbled text. Later, we found the correct method in a reply from a forum, I would like to share it with you.
Summarize the Three conversion methods found on the Internet:
Method 1: Use FunctionsSetlocale
Setlocale (lc_all, "CHS ");
Header file # include
The idea of this method is:Configure the
Chinese Characters | random | verification Code | CHINESE
A few days ago to apply for free QQ number, suddenly found in the application form of the verification code content replaced by Chinese, this shouting call me surprised to feel funny, moper on the cat on the big scold Tencent use Chinese authentication code. 'I
Chinese Characters | random | verification Code | CHINESE
A few days ago to apply for free QQ number, suddenly found in the application form of the verification code content replaced by Chinese, this shouting call me surprised to feel funny, moper on the cat on the big scold Tencent use Chinese authentication code. ^_^
Java Chinese garbled solution (1) ----- recognition of character sets, java Solution
After a long silence (about three more months), LZ began to write blogs as he couldn't help it!
The Chinese problem in java encoding is a common problem. Every time a Chinese garbled LZ is encountered, it is either modified based on pr
MySQL uses the default Character Set latin1. That is to say, the Chinese character fields are stored directly using the GBK internal code encoding. When you need to perform pinyin sorting for some fields with Chinese characters
MySQL uses the default Character Set latin1. Th
Applications later than ucgui 3.94 support dual-byte processing, such as Chinese and Japanese. Basically, all Chinese characters can be processed, regardless of display, modification, and input method.
1: Chinese Character Library
To display double-byte Chinese characters, y
Gb2312 Chinese character location code, switching code and in-memory Code Conversion Method (zt)
In order to meet the needs of computer processing of Chinese character information, in 1981, China promulgated the gb2312 national standard. This standard selects 6763 frequently-used
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.