Overseas space garbled Solution

Source: Internet
Author: User
Tags mdb database
Overseas space garbled solutions are prone to garbled characters in American space such as Godaddy, especially in Windows space due to access or ms SQL.
Each person has different solutions. I have summarized the solutions on the Forum and the Internet. I have not tested the methods below. Please try them by yourself.

Recommendation *****
The first line on the Data Extraction pageCodeUse the following code: (similar to conn. asp)
<% @ Language = VBScript codePage = 936%>

1.if HTML file (.htm. html ):
Add <meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/> to

2. For PHP/cgi files (. php. php3. PhP4 ):
Add <? Header ("Content-Type: text/html; charset = UTF-8";?>

3. If it is an ASP file (. asp. jsp ):
The following is a back-to-back example of the solution to the Chinese problem of ASP source files on foreign servers:

1. first, put your ASP source file in IIS for a comprehensive test, call each function, make sure it is fully usable, display Chinese correctly, and open *. check whether the Chinese display is normal in the mdb database file. After all the files are backed up, you can perform step 2.

2. If you do not understand ASP, the simplest method is:
Open all *. asp files and insert <% @ Language = VBScript codePage = 936%> in the first line,

Exceptions:
① If the first line starts with <% @ Language = "vbs succeeded" %>,
Change the first line to <% @ codePage = "936" Language = "vbs networking" %>

② If the first line begins with <HTML> or <script language = "javas Syntax">, It is not added.

3. after step 2 is completed, use IIS to test each function, such as \ 0 \ Conn. ASP line 1 is the error message, meaning: Conn. ASP source file first line error, then delete the <% @ codePage = "936" %>, some exceptions, please go to the http://search.microsoft.com/default.asp; here, enter "error message" to query. After all functions are tested, upload them to a foreign server for testing.

4. method: Call each function. After all the functions are correctly used and Chinese characters are displayed, click "Next "*. MDB File (very important), open it, and make sure that Chinese characters are correctly displayed.

In addition, the Chinese display method of acess2000 on a foreign server does not need to be converted to the database acess2000. You only need to add <% @ codePage = 1256%> to the first line of ASP.

######################################## ######################################## ###########################
How to solve Chinese display problems in foreign space
NonProgramThe generated text can be displayed. However, only e text generated by the program can be displayed. All Chinese characters are ???? Number, which is caused by database garbled characters.

Method 1:
Use Microsoft Access 2000 or 2003 to open the database. Choose tools> Database Utilities> convert database> to an earlier access database version. OK!

Method 2:
Later, I subscribed to Microsoft's newsgroup and found it discussed in Microsoft's newsgroup DOTNET. Framework. aspplus. General.
ProblemsArticleTo add <% @ codePage = "936" %> to the beginning of each page.
<% @ Page C %>
Hurry up and test it. OK !!!

The example is shown below:
<% @ CodePage = "936" %>
<% @ Import namespace = "system. Data" %>
<% @ Import namespace = "system. Data. Ado" %>
<% @ Import namespace = "system. Globalization" %>
<HTML>
<Head>
<Meta http-equiv = "Content-Type" C>
</Head>

Method 3: (applicable to Asp.net)
Add a config. Web file
Under the web directory,
Create a config. Web file with the following content in the web directory:
<Configuration>
<Globalization
Requestencoding = "UTF-8"
Resp
/>
</Configuration>

######################################## ######################################## ##################################

If garbled characters occur on the entire webpage, check whether encoding is set in the meta tag in the page code.
For example: <meta http-equiv = "Content-Type" C/>

######################################## ######################################## ###########################

<% @ Language = "VBScript" codePage = "65001" %>
<%
Response. charset = "UTF-8"
Session. codePage = 65001
%>
Have you added all of these? I used to have some strange things. It turns out that response. charset = "UTF-8" is not added.

######################################## ######################################## ###########################
If it is an MSSQL database, garbled characters are inserted
The solution is to add n before the quotation marks of the Chinese characters to be inserted.
For example
Insert into theme (name, about) values ('pupu', 'u.s. host detective ');
To avoid garbled characters in the English version of SQL Server, you must
Insert into theme (name, about) values ('pupu', n' U.S. host detective ');

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.