SQL and Chinese Characters

I have a classic ASP web application with MS SQL 2008 back end.
98% of my users use the regular keyboard, but there are a few that have a Chinese keyboard.

When they type in and save a field it shows weird characters after saving.
What needs to be done so that they save correctly ?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Big MontyWeb Ninja at largeCommented:
make sure you're using UTF-8 when saving your data, have a read of this article for more understanding


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Shaun KlineLead Software EngineerCommented:
One other item to be concerned with is that you are using nchar/nvarchar when saving data as these SQL data types can handle the double byte character set that the Chinese language uses. You may also need to adjust the language type for the columns in your SQL data tables as this can also cause issues when saving data. Start with Big Monty's suggestion first, though.
Vitor MontalvãoMSSQL Senior EngineerCommented:
What's the collation set for the SQL Server instance and the database?
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

AleksAuthor Commented:
it is:  SQL_Latin1_General_CP1_CI_AS

Most users will enter information in English or Spanish, but we want to allow Chinese characters as well.
Is this possible without causing any issues to existing data and new data entered in Spanish or English ?
Vitor MontalvãoMSSQL Senior EngineerCommented:
The only way to store Chinese characters is to use a Chinese collation.
You can add a Chinese collation column to the table so when it's Chinese character you store the value into this column otherwise in the current one.
AleksAuthor Commented:
That is a whole lot of work, its basically having to duplicate the database. :#
any other ideas ?
Big MontyWeb Ninja at largeCommented:
The only way to store Chinese characters is to use a Chinese collation.

I don't believe that's true, as you just need to save the data in unicode format. I know this because I just checked my database and it only has SQL_Latin1_General_CP1_CI_AS collation on the table I store the data in.

Aleks - did you have a look at the article I posted? Did you try setting the headers? If so, what happened? Maybe you could post some example code?
Vitor MontalvãoMSSQL Senior EngineerCommented:
A Unicode database is also a good solution but now it will give some work to migrate the current non-Unicode database to an Unicode one.
Vitor MontalvãoMSSQL Senior EngineerCommented:
This question is neglected.
amucinobluedot, do you have any feedback on this?
AleksAuthor Commented:
This is not something feasible (migrating data, etc), for now it will remain the same way it is. Thanks for the help.
AleksAuthor Commented:
I had to put this on hold but the two solutions may work. I won't implement until later this year, sorry.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.