Inserting asian chacaters - Japanese, Korean, Chinese RRS feed

  • Question

  • I am on SQL Server 2008, my collation is SQL_LATIN1_general_CP1_C1_AS which comes from instance collation..


    My table schema has nvarchar fields

    I.e. address nvarchar (256)


    Now using SSMS or t-sql if I insert address using N'a string containing Asian Characters' where String contains some Asian Characters; will they be saved correctly and displayed correctly in SSMS...

    The place where I am confused is SQL_LATIN1_general_CP1_C1_AS; this is a collation - sorting etc; but what determines What kind of characters can be stored in database?


    I come from Oracle background where database character set determines everything and is generally set AL32UTF8 for Unicode.

    I know in SQL Server there is no UTF8, only UCF2 which is implemented for nvarchar columns...


    But is not some setting at server instance level which determines which Unicode characters can be placed in database. If yes, what is that?


    I know UNICODE Is a complex topic; it involves databases, Windows OS and application. I can research my application; but at database and Windows OS what needs to be set so Asian characters can be stored and displayed.



    Saturday, January 12, 2013 4:08 AM


  • Hello,

    You're correct about collation and SQL Server. When it comes to the N*CHAR columns, yes you can put in any character set you would like, the catch being that the client needs to have the correct way to interpret it - which generally comes down to applicaiton support and fonts.

    It is very easy to test, create a quick table with an NVARCHAR(50) field (or whatever you would like) and use the windows character tool to grab a few characters in all different languages. Insert that into the table, then select the data and see what happens. The biggest issue I see with unicode - especially foreign languages - is that an application is not designed to consume them. For example a textbox might be set to only allow ansi characters, or isn't wide or tall enough to show the foreign language completely. As I've siad above the last issue I see is that people will post something to the effect of "It comes up as all square blocks" which means the correct font is not installed.


    Sean Gallardy | Blog | Twitter

    • Marked as answer by Prem Mehrotra Saturday, January 12, 2013 2:14 PM
    Saturday, January 12, 2013 5:36 AM