Which Collation to use for Russian, German and Arabic

二次信任 提交于 2020-01-04 14:21:37

问题


Which Collation shall I use to save Arabic, Russian, English and German Characters to the Database?

My column setting is nvarchar(100)

I have set it currently to:

SQL_Latin1_General_Cp1256_CI_AS

It is saving Arabic, German and English but I need to save Russian too.


回答1:


I guess you have problems inserting the values.
You need to prepend N before the start of the string, otherwise it doesn't work.

You're doing:

Insert 'bla' into your_table

instead of

Insert N'bla' into your_table

SQL server does not have a unicode collation.
However, there is a binary collation "SQL_Latin1_General_1251_BIN".
It stores the code points in numerical order, which can be pretty arbitrary.
It's not culture-specific though (despite the name).



来源:https://stackoverflow.com/questions/19315894/which-collation-to-use-for-russian-german-and-arabic

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!