Solving the problem of spatial garbled display in foreign countries

Source: Internet
Author: User
Tags add config iis mdb database php file first row access database access
Solve | problem | Show finally found a free space, but put the page up to see some garbled, is not very lit it? But after reading this article will not be lit up, we have a solution!

The first line of code in the data extraction page can be replaced by the following code:
<% @language =vbscript codepage=936%>
1. If HTML file (. htm. html):
In , add the
2. If php/cgi file (. php. PhP3. PhP4):
In each PHP file the first line plus


3. If ASP file (. asp. JSP):
Here to talk about the ASP source file in foreign servers on the Chinese problem Solution:

1. First of all, put your ASP source files in IIS for a comprehensive test, call each function, verify that it is fully available, and correctly display Chinese, and open the *.mdb database file to see if the Chinese display is normal. After all pass, do a backup file, you can perform the second step.

2. If you don't know anything about ASP, the easiest way to do this is to:
Open all *.asp files and insert <%@ codepage= "936"%> in the first line,

Exceptional cases:
①, if the first line starts with the <%@ language= "VBs cript"%>,
The first line is changed to: <%@ codepage= "936" language= "VBs cript"%>

②, if the first row starts with the or

3. After the completion of the second step, and then use IIS to test each function, such as the display \0\conn.asp Line 1, that is, the error message, meaning: conn.asp source file The first row is wrong, then the <%@ codepage= "936"%> deleted, some exceptions, please C0>http://search.microsoft.com/default.asp ;; Here, the input "error message" Query can be, all functional testing feasible, you can upload to foreign servers, for testing.

4. Method or: Call each function, all can use correctly and can display Chinese, then "pass" *.mdb file (very important), open, confirm can display Chinese correctly, accomplished.

In addition, in the foreign server using ACESS2000 Chinese display method does not convert the database ACESS2000, only in the first line of ASP add <%@ codepage=1256%>

How to solve the problem of foreign space Chinese display problem
Non-Program generated text can be displayed. But the text generated by the program is only e-text can be displayed. Chinese is all? Number, this is caused by the database garbled.

Method One:
Using Microsoft Access 2000 to open the database, select Tools menu > Database Utilities > Transform database to the earlier Access database version. Ok!

Method Two:

Later subscribed to Microsoft's newsgroups and found in Microsoft's newsgroup dotnet.framework.aspplus.general that there was discussion of this
An issue of the article, the method for adding <%@ CODEPAGE = "936"%> to the beginning of each page, somewhat similar to the JSP in the
<%@ page contenttype= "text/html;charset=gb2312"%>
Quickly tested it, sure enough!!!

Examples are shown below:
<%@ CODEPAGE = "936"%>
<%@ Import namespace= "System.Data"%>
<%@ Import namespace= "System.Data.ADO"%>
<%@ Import namespace= "System.Globalization"%>



Method Three:


Add a Config.web file to
Web directory,
Create a file Config.web, as follows, in the web directory

Requestencoding= "Utf-8"
Responseencoding= "Utf-8"
/>



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.