Link to home
Start Free TrialLog in
Avatar of craig32768
craig32768

asked on

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

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?
Avatar of HainKurt
HainKurt
Flag of Canada image

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
Avatar of craig32768
craig32768

ASKER

It's a multi-lingual forum tough....
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
HI - Yes my mistake - one of the ASP include files mas missing the response.charset.

Thanks so much