Typically, our web page will specify a coded character set, such as GB2312, UTF-8, iso-8859-1, and so on, so that we can display the text we specify on the page. But we are likely to encounter the situation where we may want to display Chinese characters on iso-8859-1-encoded web pages, or to display Korean on GB2312-encoded web pages. Of course, a solution is that we do not use iso-8859-1 or GB2312 coding, and all using UTF-8 code, so that we can only be in this code, the mixed display of national characters, which is now a number of Web sites using the method.
And what I'm saying here is not the above method, because the above method must specify the character set for UTF-8 only, once the user manually assigned to other character sets, or perhaps for some reason, that character set settings did not work, and the browser does not correctly automatically identify the words, we see the page or garbled, Especially in some frames of the Web page, a frame of the page if the character set settings do not work, in Firefox display garbled and can not be changed (I mean in the case of not installing Rightencode plug-ins).
And the method I introduced here even if the Web page is designated as the Iso-8859-1 character set, can also correctly display Chinese characters, Japanese and so on. The simple principle is that all other encodings except the first 128 characters in the ISO-8859-1 code are represented by NCR (Numeric character reference). For example, the words "Chinese characters", if we write "Chinese" in this form, then it can be displayed correctly in any character set. Based on this principle, I wrote the following program, which transforms the existing Web page into a Web page that can be displayed in any character set. You only need to specify the source page of the character set and source page, click the Submit button, you can get the target page. You can also only convert some text, just fill in the text box, and specify the original character set of the text, point submit button, it will appear on the page encoded text. In addition, I also wrote WordPress plug-ins, now my Blog can be in any character set can be displayed correctly.
Conversion program Address: http://test.coolcode.cn/nochaoscode/
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.