?
Solved

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

Posted on 2010-01-06
4
Medium Priority
?
743 Views
Last Modified: 2012-06-27
Hi

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?
0
Comment
Question by:craig32768
  • 2
  • 2
4 Comments
 
LVL 61

Expert Comment

by:HainKurt
ID: 26196522
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: http://zsigri.tripod.com/fontboard/cjk/meta.html
0
 

Author Comment

by:craig32768
ID: 26196551
It's a multi-lingual forum tough....
0
 
LVL 61

Accepted Solution

by:
HainKurt earned 2000 total points
ID: 26196585
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" />
0
 

Author Closing Comment

by:craig32768
ID: 31673835
HI - Yes my mistake - one of the ASP include files mas missing the response.charset.

Thanks so much
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

755 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