SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Which Column Collation Do I Need To Use????


Which Column Collation Do I Need To Use????

Author
Message
Scout7
Scout7
Valued Member
Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)

Group: General Forum Members
Points: 59 Visits: 17
Hi all, I am in the process of Internationalizing our website. I am aware that I may well have to make changes to the database with regards to collation. I need to know which is the best catch all collation type or am I going to have bigger problems?

The main languages that we are going to use i.e. English, French, Spanish, etc all work ok with the default collation on the appropriate text column. I start to have problems when I try to store Hindi characters. When I look at the database after storing the Hindi text or try to display it onlt show loads of question marks as follows '??? ???? ??'. Any idea what I need to do to fix this? Am I going to have to create different columns with different collations?

Any advice greatly appreciated.



Florian Reischl
Florian Reischl
SSCrazy Eights
SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)

Group: General Forum Members
Points: 8453 Visits: 3934
Hello

I would advice to not change the collation of your table columns! I may run into problems if you use another collation than the servers default collation. Just use the NVARCHAR data type to covert all languages.

I'm currently also working with Arabic language tables but without any changes of the collation.

Greets
Flo


The more I learn, the more I know what I do not know
Blog: Things about Software Architecture, .NET development and T-SQL

How to Post Data/Code to get the best Help How to Post Performance Problems
Scout7
Scout7
Valued Member
Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)

Group: General Forum Members
Points: 59 Visits: 17
I still current have everything set to the database default, which is as follows;

Windows Collation - Latin1_General
Dictionary Sort - Accent Sensitive.

This is working fine for most of main languages as previously stated but something is terribly wrong when I store Hindi which made me think about the collation. I do not want to change anything if I can help it but I do not know how else to fix it? Blink



Florian Reischl
Florian Reischl
SSCrazy Eights
SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)SSCrazy Eights (8.5K reputation)

Group: General Forum Members
Points: 8453 Visits: 3934
What's the data type of the destination column?


The more I learn, the more I know what I do not know
Blog: Things about Software Architecture, .NET development and T-SQL

How to Post Data/Code to get the best Help How to Post Performance Problems
steveb.
steveb.
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10018 Visits: 7195
Scout7 (3/11/2009)
I still current have everything set to the database default, which is as follows;

Windows Collation - Latin1_General
Dictionary Sort - Accent Sensitive.

This is working fine for most of main languages as previously stated but something is terribly wrong when I store Hindi which made me think about the collation. I do not want to change anything if I can help it but I do not know how else to fix it? Blink


Collation does not affect the way the data is stored, it only really affects the way character fields are sorted and compared to each other.

As long as you are using unicode columns, and insert the data using the leading 'N' for unicode , then the data should store without any issues.
Scout7
Scout7
Valued Member
Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)Valued Member (59 reputation)

Group: General Forum Members
Points: 59 Visits: 17
I am now officially an idiot. The datacolumn is correct in being NVarchar(MAX) BUT I overlooked the fact that my stored procedure was accepting the data as only Varchar(MAX), doh!!! Blush

Changed so all paramter types are the same and all is working well. w00t

Thanks for your help.



Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search