希伯来语编码在sql server2005中 [英] Hebrew encoding in sql server2005
本文介绍了希伯来语编码在sql server2005中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在sql server 2005中尝试此代码
i try this code in sql server 2005
declare @userName nvarchar(50)
set @userName='איש2'
print @userName
但我得到这个
???2
原因是什么?
它看起来像将希伯来字符替换为?
it look like it replace the Hebrew char to "?"
10x
10x
推荐答案
使用 N
前缀,因此字符串文字被解释为unicode不是char在您的数据库的默认排序规则下的代码页下面
Use the N
prefix so the string literal is interpreted as unicode not char under the code page of whatever your database's default collation is
declare @userName nvarchar(50)
set @userName=N'איש2'
print @userName
这篇关于希伯来语编码在sql server2005中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文