Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Which Column Collation Do I Need To Use???? Expand / Collapse
Author
Message
Posted Wednesday, March 11, 2009 6:29 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, June 29, 2009 7:12 AM
Points: 45, 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.



Post #673165
Posted Wednesday, March 11, 2009 6:36 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Sunday, November 4, 2012 12:23 PM
Points: 1,893, Visits: 3,932
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
Post #673179
Posted Wednesday, March 11, 2009 6:44 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, June 29, 2009 7:12 AM
Points: 45, 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?



Post #673186
Posted Wednesday, March 11, 2009 8:01 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Sunday, November 4, 2012 12:23 PM
Points: 1,893, Visits: 3,932
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
Post #673266
Posted Wednesday, March 11, 2009 8:13 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, May 30, 2014 6:27 PM
Points: 2,808, Visits: 7,175
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?


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.
Post #673285
Posted Wednesday, March 11, 2009 8:21 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, June 29, 2009 7:12 AM
Points: 45, 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!!!

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

Thanks for your help.



Post #673296
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse