SQL Server Collation for central european characters and other languages

Posted on 2004-11-24
Last Modified: 2013-12-03
I need to store central european characters eg Slovenian in my SQL Server 2000 database as well as English and western european characters. Am I right in thinking that using the default SQL_Latin1_General_CP1_CI_AS collation won't do the trick ? which collations do support central european characters ? I think SQL_Latin1_General_CP1250_CI_AS does support central european but are there any other options ?

what I don't really understand is how to choose which collation to use because what I really want to be able to do is store characters from any language in my database. if I wanted to store translations from every language in my database is there one collation that can do that ? eg I'll probably need to store chinese as well at some stage. do I need to have a number of different databases with different collations to support all languages? if so, what different collations would I need for that ?
Question by:TomWilmott
    LVL 16

    Accepted Solution

    Well, you need unicode data types (nvarchar not varchar, nchar not char, ntext not text). The collation doesn't determine what characters are available, only how they are compared and sorted.

    Author Comment

    I'm using nvarchar but when I insert a slovenian string into a table in a database that uses SQL_Latin1_General_CP1_CI_AS and then select the row from the table using query analyser, the string isn't displayed the same as the original that was inserted. some of the special characters are missing.

     but if I do the same thing in a database using SQL_Latin1_General_CP1250_CI_AS the select returns exactly the same as was inserted.

    that's ok, but slovenian is just one of many languages I'll need to support.
    LVL 10

    Expert Comment

    Just make sure that every required font set is installed on your server/computer. If you are using nvar, ntext etc, the database will be storeing whatever you feed it. If you don't have the font (code page) installed, the DB will return the correct result but not display it correctly.

    You will also need the correct code pages installed on the the computers that are receiving the output from the SQL server. The server may spit out Chinese characters but unless the recipeint has the properly installed font, they will just see garbage.

    You can find the code page/unicode/fonts stuff in Regional Settings.

    Author Comment

    thanks both. the problem was that the data being inserted into the db didn't have an N in front of the string. that works ok if the collation is CP1250 but not if collation is CP1.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    I guess that all of us know that caching the data usually increase the performance, but I worried if all of us are aware about the risk that caching the data provides and how to minimize this.  That’s the reason why I decided to write this short art…
    Creating and Managing Databases with phpMyAdmin in cPanel.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now