UTF-8 / ASP Problem - Foreign Characters from SQL 2008

Posted on 2010-01-06
Last Modified: 2012-06-27

Using classic ASP.

I have a web page with a form with a text box. If I enter Chinese characters into the text box at write them to the database (nvarchar(max)). I am using a parameterize insert or update query using ADO.

When getting the result back in a record-set and displaying it on a webpage I get gibberish.

So for example: If I enter –some Chinese  into the text box I get <p>é¦页</p> back out in the browser.

Interestingly I just entered the Chinese characters into this post and when I viewed my question they displayed as "u"!

I have <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> on the page and also <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />.

Any ideas?
Question by:craig32768
    LVL 51

    Expert Comment

    I guess you should use

    Traditional Chinese
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">

    Simplified Chinese
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">

    check here:

    Author Comment

    It's a multi-lingual forum tough....
    LVL 51

    Accepted Solution

    do you have a link to have a look at it?

    this EE site is using

    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />

    Author Closing Comment

    HI - Yes my mistake - one of the ASP include files mas missing the response.charset.

    Thanks so much

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
    If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now