Friday, March 9, 2012

How to set right utf-8 in sql server 2005 db?

Hello,

I try to insert some data in Vietnamese into sql server db from Sql server management studio express.

I enter an insert query with some unicode data like this 'm?t hai ba b?n n?m sáu b?y tám chín m??i', and I expect the db should contain the same text as above.

However, what I retrieved is 'm?t hai ba b?n nam sáu b?y tám chín mu?i'.

Can anyone help? Many thanks.

maivangho

Hi~ you may check you server's regional settings in control panel, and set all those to your language related, and check<globalization> section of config file.

If it still doesn't work, underSystem.Text there are some classes for encoding/decoding, you may try encode your data before putting them into DB... though this is not a good walkaround..

No comments:

Post a Comment