Contact Yart for a relaxed conversation
Your Name * Message *
Your Email *  
Your Phone   
Our Phone:        03 8685 8718 (within Australia)
61 3 8685 8718 (outside Australia)
Contact Yart

ECommerce, Umbraco and WordPress developers in Melbourne, Australia

– call us on 03 8685 8718

Resources / ASP NET / Saving Chinese Unicode in ASP NET
Saving Chinese and Unicode Characters in ASP.NET

by Petras Surna

There are a lot of articles about this on the net:

But suffice to say this. When you save characters from a form postback the characters ***will*** be encoded. If you do not specify an encoding it will be determined for you.

This can be very confusing!!!

Chinese characters may appear to look OK in ASP but not in ASP.NET

So to stop problems, always declare your encodings! Typically we use utf-8.

In ASP, do this:

@CodePage = 65001
Option Explicit

Session.CodePage = 65001
Response.CodePage = 65001
Response.CharSet = "utf-8"

When saving SQL directly, make sure the characters get saved in nvarchar, ntext etc

Declare the encoding in HTML as well:

meta http-equiv="Content-Type" content="text/html; charset=UTF-8"

In ASP.NET, add this to web.config:


The latest at Yart