Greek letters clobbered

  • I need to store information with occasional Greek characters. My

    SELECT CONVERT (nvarchar, SERVERPROPERTY('collation')) is SQL_Latin1_General_CP1_CI_AS

    Test script:

    create table test1 (title nvarchar(200)

    INSERT INTO test1 (title )

    VALUES ('FcεRI-mediated activity' )

    select * from test1

    converts the third character from epsilon to "e"

    How can I store unicode data correctly?

    Thank you for assistance.

  • Alter the table as the following to support the Greek character.

    ALTER TABLE test1

    ALTER COLUMN title nvarchar(200) COLLATE greek_ci_as

  • Thank you, but it did not work.

    Is there a database-level collation that might be effecting this?

  • This worked:

    create table test1 (title nvarchar(200) COLLATE greek_ci_as)

    INSERT INTO test1 (title)

    VALUES (N'FceRI-mediated activity')

    select * from test1

    The "alter" works for columns already present.

  • The collate change was unnecessary. Not having to change collation makes testing a large application much simpler.

  • You won't need to change the collation at all.

    The reason it is not storing unicode is because you are not passing the string as Unicode.

    add the leading unicode N before your string and this will work.

    eg

    INSERT INTO [test1] (

    [title]

    ) VALUES (N'FceRI-mediated activity' )

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply