开发者

SQL Collation & Datatype: Support Both Western and Arabic data in a field

开发者 https://www.devze.com 2022-12-25 21:59 出处:网络
I have a Delphi + SQL Server (2k or 2005 supported) app that is used by both western and Arabic users. For some fields (i.e. name) my app needs to be able 开发者_JS百科to support both Arabic language

I have a Delphi + SQL Server (2k or 2005 supported) app that is used by both western and Arabic users. For some fields (i.e. name) my app needs to be able 开发者_JS百科to support both Arabic language and western language characters.

Is it possible to set a single collation & datatype for a field to handle either English or Arabic data? NB: I do not want 2 separate DB's, I want one DB that supports both languages.


ISO 8859-6 (or its Windows codepage lookalike cp1256) gives you Arabic and Western characters in as much as the lower 128 characters are the same as ASCII. You are out of luck if you want non-ASCII ‘Western’ characters like the accented letters.

Better, though, would be to support all of Unicode. I don't know about Delphi, but in SQL Server you get NVARCHAR, which is your datatype of choice for native Unicode strings. (Stored as UTF-16LE internally.)


change type of columns from varchar() to nvarchar() in sqlserver i try it and runin

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号