ASP + ACCESS garbled

Source: Internet
Author: User

Garbled characters are displayed on the page and in the database. The second method is used to solve the problem.

 

Method 1:
Add at the beginning of each page
<% @ CodePage = "936" %>
Or
<% @ Language = "VBScript" codePage = "936" %>

@ CodePage
You can use the @ codePage command to set the code page for the. asp file. The code page is a character set that includes numbers, punctuation marks, and other characters. Different Languages and scenarios
Use different code pages. For example, the ANSI code page 1252 is used by American English and most European languages, while the OEM code page 932 is used by Japanese characters.

A setting in DW... the garbled part should be in the western European font. you can change it to simplified Chinese. property-> page property-> title and encoding-> change to simplified Chinese gb2312, click "reload", OK

Add <meta http-equiv = "Content-Type" content = "text/html; charset = gb2312">

Method 2:

Page is UTF-8
Ajax POST method...
After the ACCESS database is written, it is garbled ....
The solution is to change the page encoding to a UTF-8, and add the following statement to the header of the ASP page.

<% Response. charset = "UTF-8" %>

Method 3:

Solutions to the garbled problem of editing asp web pages with Dreamweaver:

When editing a webpage in Dreamweaver MX 2004, many friends often encounter Chinese garbled characters.

I encountered a similar problem when creating a webpage. I have spent a lot of effort on this. I must not be a professional. No matter how it is solved
. Now, share it with everyone.
Symptom: use Dreamweaver MX 2004 to view ASP source files. All Chinese files are garbled. When I use NotePad to open ASP source files
It is completely normal.
"I believe in the masses", go online and search for it... there are a variety of sayings, saying "Dreamweaver MX 2004, its Chinese compatibility itself
It is not good ". Believe Him, I have installed Dreamweaver 8.0, and the result remains.
Finally, the methods for integrating the "masses" are as follows:
1. Enter the Edit/preferred parameter/font and set it to "simplified Chinese". The result is still displayed.
2. Go to the "modify" menu and modify the webpage code. The result remains unchanged.
3. Insert meta encoding in the header of the ASP source file opened in Notepad. The problem is solved. The following code is inserted in the header.
<HTML>
<Head>
<Meta http-equiv = "content_type" content = "text/html; charset = gb2312">
</Head>
4. If it is ineffective to input the above encoding in the code of Dreamweaver MX 2004, you must use a code other than Dreamweaver MX 2004.
Open, insert, and save the software. Use Dreamweaver mx2004.

Method 4:
If you occasionally encounter garbled characters when debugging ASP pages, you can close your browser and re-open the page. If the garbled problem persists, try the three methods described above. Sometimes I have encountered such a problem. It is normal to open the page and the garbled code is refreshed. Open the source code to modify a place, save it, and then open the page. The page is displayed normally. Refresh and garbled. It is indeed depressing to have such a problem. The previous methods were ineffective. Then I closed my browser and re-opened the page.

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.