gpt4 book ai didi

sql - sql server 2005中的希伯来语编码

转载 作者:行者123 更新时间:2023-12-02 07:13:26 26 4
gpt4 key购买 nike

我在 sql server 2005 中尝试这段代码

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

但是我明白了

???2

是什么原因?

它看起来像是将希伯来字符替换为“?”

10倍

最佳答案

使用 N 前缀,这样无论数据库的默认排序规则是什么,字符串文字都被解释为 unicode 而不是 char

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

关于sql - sql server 2005中的希伯来语编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3438483/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com