SQL Server Performance

How do I save UTF-8 data?

Discussion in 'General Developer Questions' started by SQLess, Jul 28, 2003.

  1. SQLess New Member

    Our website needs to support multiple languages in UTF-8 format. I'm not sure how to get the translated text in and out of MS SQL 2000. For example, I go to babelfish.altavista.com to do my own translation. I type in "Hello" and choose "English to Chinese", and it'll give me back the translation "ÄãºÃ" (what's showing here is not the actual translation I originally got, it got converted to ascii characters). Should I store the actual translation or should I store the encoding and do the translation in Java?

    Can you please give an example?
  2. Chappy New Member

    You should be able to store the actual translation. Use the nvarchar (or nchar) datatypes to store unicode strings as opposed to the single byte varchar and char types.
  3. SQLess New Member

    Okay, here is the question.
    babelfish.altavista.com is UTF-8 encoding so I assume whatever translation I got from the site will be encoded in UTF-8. Is that correct? If that's the case, how do I store that value into SQL 2000 nvarchar? Keep in mind that SQL 2000 Unicode support is in UCS-2 format.

Share This Page