How to handle different language? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to handle different language?

My database is using SQL_Latin1_General_CP1_CS_AS. One of the fields in a table contains value like this: ˜~¡ÅÂÃ͹Ãv™Æ¼È¶|oœ¼Â¬¾¸tg‰†d|vztxj]‘Ž{ If I change the Windows option "Language for non-Unicode programs" to language such as Chinese (Hong Kong S.A.R.), when I select that field through ODBC, the returned value is different from the one returned when the language is English (United States). How can I fix this so the returned value is same in both cases? Thank you.
What is the option set for windows locale?
Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Is the column a Unicode column or a non-unicode column? MeanOldDBA
[email protected] When life gives you a lemon, fire the DBA.
Hi Satya, When you say Windows Locale, I guess you mean the "Language for non-Unicode programs" setting in the Advanced tab of the Regional and Language Options screen in the Windows XP SP2 machine. The setting is set to "Chinese (Hong Kong S.A.R.)". The System DSN in the ODBC Data Source Administrator has the following settings: – The checkbox for the setting "Change the language of SQL Server system messages to:" is not checked. – The checkbox for the setting "Perform translation for character data" is checked.
Thank you.
Hi derrickleggett, The column is non-Unicode. It is defined with this: [minfo] [text] COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL.
Thank you.
BOL defines:
Using Unicode data types, a column can store any character defined by the Unicode Standard, which includes all of the characters defined in the various character sets. Unicode data types take twice as much storage space as non-Unicode data types.
Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Basically, I have a text file which contains some text which includes some extended ASCII characters. I want to able to save the content to the column. I want to able to read the data from the column and perform some manipulation on the returned value. The problem is that if the Windows Locale is not English, the returned value using ODBC is different from the one using Query Analyzer. Is it something that I should change on the ODBC System DNS or I should change the column to ntext? Thank you.

Can you change the font used in the client applicationthat uses ODBC?
I think using NTEXT is ideal in this situation, may test the implications. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
Adriann, I don’t think I can change the font.
Satya, I tried to use ntext but I don’t see any difference but I probably did something wrong. This is what I’m trying to do: 1. In a machine having English as Windows Locale, encrypt text such as "ABC12312321dsdf" to some ASCII extended characters such as "Ëœ~¡ÅÂÃ͹Ãv™Æ¼È¶" based on a algorithm. 2. Save the encrypted text to a column in SQL Server table. The workstation may have English as Windows Locale or other language such as Chinese (Hong Kong SAR). 3. Retrieve the encrypted text through ODBC from any workstation which may have English as Windows Locale or other language such as Chinese (Hong Kong SAR). Decode the encrypted text back to "ABC12312321dsdf" based on a algorithm. I’m not familiar with Unicode and code page.
Thank you for any help.
]]>