开发者

Hebrew encoding in sql server2005

开发者 https://www.devze.com 2023-01-10 23:04 出处:网络
i try this code in sql server 2005 declare @userName nvarchar(50) set @userName=\'איש2\' print @userName

i try this code in sql server 2005

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

bu开发者_如何学Pythont i get this

???2

what is the cause?

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

10x


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
0

精彩评论

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