ACCESS + ASP database garbled Solution

Source: Internet
Author: User

 

Use asp and access database, and the webpage code is UTF-8. Garbled characters appear, and all the text read from the database is garbled.
Solution:
<% @ Codepage = "65001" %>
<Http-equiv = "Content-Type" content = "text/html; charsets = UTF-8">
One cannot be less
In addition, files must be stored in UTF-8 format
Also, the program cannot go wrong.
If there is an incorrect program, it will be normal when it is just opened. If it is refreshed, it will be garbled.
The error described here does not cause the error that is not displayed on the entire page.
1, <% @ codepage = "65001" %>
2, 3, Session. CodePage = 65001
4, the file is saved as a UTF-8
Let me talk about it. I have more experience.
2, ========================================================
This is important and common. It determines which internal code the browser chooses to access your webpage.
4, the file is saved as a UTF-8
If you use the Chinese Input Method, the web page appears Chinese, this is more important, because we use the common input method of text is not UTF format, so you have to save to the UTF-8 format.
All text read from the database is garbled
==================================
1, <% @ codepage = "65001" %>
In this case, 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, it forces ASP to use UTF to transmit data.
Try to add a row under <% @ codepage = "65001" %>:
<% Session. CodePage = 65001%>

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.