HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

SQL Server Collation for Arabic, Hebrew, English and French

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
frenchenglishsqlhebrewandforcollationserverarabic

Problem

I have new SQL Server database which need to have support in 3 different languages.

What character sets and collations do I need to choose if I want my database to support the following:

  • Hebrew



  • Arabic



  • English



  • French

Solution


  • Language support comes from datatype: use nvarchar/nchar (which stored unicode basically)



  • Collation is sorting + comparing + non-unicode code page



So, one column can store all languages, but it can have only one collation. You can "add" extra collations using computed columns, or coerce it during a sort/compare using the COLLATE clause:

Example

ORDER BY
    LatinCollationCol COLLATE Arabic_CI_AI_KS = N'عربي/عربى';

Code Snippets

ORDER BY
    LatinCollationCol COLLATE Arabic_CI_AI_KS = N'عربي/عربى';

Context

StackExchange Database Administrators Q#13193, answer score: 7

Revisions (0)

No revisions yet.