Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-06-30 : 07:58:23
|
| Jon writes "We have a SQL Server 2000 (SP3) database that was installed with the default collation for the US (Latin1_General_CI_AS_WI - sort order 52, code page 1252). We use a CRM application and have many international users (mostly US, Latin America, and Western Europe) and so far this collation has worked well, however, we are going to be adding Russian users soon. I don't think we'll be able to use Unicode with our application so I'm thinking we might be able to use a Cyrillic code page (1251).Is the Cyrillic code page (1251) compatible with the Latin1 code page (1252) and what "gotchas" might we encounter after switching? Essentially will this support all of our current and future users? Do you have any other suggestions on how to handle this problem? Thanks for any advice, Jon" |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2005-06-30 : 08:31:22
|
quote: Is the Cyrillic code page (1251) compatible with the Latin1 code page (1252) and what "gotchas" might we encounter after switching?
If you change the collation of a char, varchar, text column to one that uses a different character set, all the characters that cannot be represented in the new character set will get converted to either the "nearest" representable character or, if there is none, a question mark. CP1251 doesn't include accented latin characters, so all those characters will get converted to their unaccented ASCII equivalents. Characters such the German sharp s (ß) and Icelandic thorn and eth (Þþ, Ðð) will turn into question marks, as will a number of characters such as fractions, currency symbols (cents, pounds, yen, but not dollars or euro), etc.This should give you an idea of exactly what happens:DECLARE @C TABLE ( pt1252 int, ch1252 char(1) COLLATE Latin1_General_CI_AS, pt1251 int, ch1251 char(1) COLLATE Cyrillic_General_CI_AS)DECLARE @i intSET @i = 32WHILE @i <= 255BEGIN INSERT INTO @C (pt1252, ch1252) SELECT @i, CAST(@i AS binary(1)) SET @i = @i + 1ENDUPDATE @C SET ch1251 = ch1252UPDATE @C SET pt1251 = CAST(CAST(ch1251 AS binary(1)) AS int)SELECT * FROM @C |
 |
|
|
|
|
|
|
|