真人街机捕鱼

Your Position: Home > News > Taoyuan Website

Utf-8 webpage creation does not display + utf-8 webpage garbled general solution

Date: 2016-12-30 9:56:37 Popularity: label:
share to:
When we browse or use uft-8 format pages, there may always be some garbled or not displayed problems. The download client and server have some reasons for analysis and solutions:
When using IE as the browser on the windows operating system. This problem often occurs: when browsing a webpage using UTF-8 encoding, the browser cannot automatically detect (that is, when the "automatic selection" encoding format is not set) the encoding used by the page.

Even if the webpage has already declared the encoding format:
<meta http-equiv = "Content-Type" content = "text / html; charset = UTF-8" />
As a result, some pages containing Chinese UTF-8 encoding produce blank output.

If you are using Mozilla, Mozilla browser, Sarafi browser this will not cause this problem. This is because when IE parses the webpage encoding, tags in HTML take precedence, and then messages in HTTP headers; Mozilla series browsers have just the opposite.

Because UTF-8 represents a Chinese character for 3 bytes, ordinary GB2312 or BIG5 are two. When the page is output, due to the above reasons, when the browser parses and outputs the content of <title> </ title>, if there are an odd number of full-width characters before </ title>, IE treats UTF-8 as two bytes When parsing a half-character, the half-character will be combined with the <title of </ title> into a garbled character, which will cause IE to fail to read the <title> part and make the entire page empty. At this time, if you look at the source file, you will find that the entire leaf surface has actually been output.
So the simplest solution is to define the characters in the <head> </ head> tag of the web page file.
<meta http-equiv = "Content-Type" content = "text / html; charset = UTF-8" />
Put before <title> </ title>.
-------------------------------------
======================
UTF-8 webpage garbled problem is solved:
<% @ codepage = "65001"%>
<http-equiv = "Content-Type" content = "text / html; charset = UTF-8">
One cannot be less. In addition, the file must be saved in utf-8 format, and the program cannot be wrong. If there is a wrong program, it will be normal when it is opened, and it will be garbled after refreshing. The entire page is not displayed error.
1, <% @ codepage = "65001"%>
2, <http-equiv = "Content-Type" content = "text / html; charset = UTF-8">
3. Session.CodePage = 65001
4. Save the file as UTF-8
Let me talk, I have more experience with this, haha

2, <http-equiv = "Content-Type" content = "text / html; charset = UTF-8">
==========================================
This is more important and more common. This determines which internal code the browser chooses to access your web page.
4. Save the file as UTF-8
If you use Chinese input method and Chinese appears on the webpage, this one is more important. Because the text we input using ordinary input method is not in UTF format, we must save it to UTF-8 format again.
All Chinese characters read from the database are garbled
======================
1, <% @ codepage = "65001"%>
If this happens, please add this sentence. In fact, the database has nothing to do with the internal code. The key is what internal code the ASP program uses to transmit your data. Adding this sentence forces ASP to use UTF to transmit data.
Try adding a line below <% @ codepage = "65001"%>:
<% Session.CodePage = 65001%>
The utf-8 webpage does not display + utf-8 webpage garbled problem can generally be solved
0
0
0
0
0
0
0
0
Name
Verification Code
Can't see clearly, change another Already Comment information, click to view comments
Comments from users
Next: No information