ASP + ACCESS Chinese garbled solution, ASP Chinese garbled, ASP garbled Problem

Source: Internet
Author: User
Tags mdb database

If you are using a foreign space, the default value is Western Europe rather than gb2312, you can force gd2312!
The first line on the Data Extraction pageCodeUse the following code:
<% @ Language = VBScript codePage = 936%>
1.if HTML file (.htm. html ):
In 2. For PHP/cgi files (. php. php3. PhP4 ):
Add <? Header ("Content-Type: text/html; charset = gb2312";?>
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 <% @ 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 <s syntax 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? Number, which is caused by database garbled characters.

Method 1:
Use Microsoft Access 2000 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 contenttype = "text/html; charset = gb2312" %>
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" content = "text/html; charset = gb2312">
</Head>

Method 3:

 

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"
Responseencoding = "UTF-8"
/>
</Configuration>

ASP garbled and access garbled Problem solved. This article can be recommended to your friends!

Related Article

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.