Hebrew encoding in sql server2005

隐身守侯 提交于 2019-11-28 09:38:34

问题


i try this code in sql server 2005

declare @userName nvarchar(50)
set @userName='איש2'    
print @userName

but i get this

???2

what is the cause?

it look like it replace the Hebrew char to "?"

10x


回答1:


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


来源:https://stackoverflow.com/questions/3438483/hebrew-encoding-in-sql-server2005

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