Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

选择sql server 数据库初始化数据时,数据库存储中文时都是"??????"这种符号 #344

Closed
kingshinewang opened this issue May 7, 2023 · 1 comment
Labels
好问题 Good for newcomers 已完成

Comments

@kingshinewang
Copy link

Describe the bug
选择sql server 数据库初始化数据时,数据库存储中文时都是"??????"这种符号

To Reproduce

  1. 原因是默认SugarColumn设置的列类型都是varchar
  2. 需要把varchar类型改为nvarchar
  3. 结合sqlSugar的文档,解决方式是在建表时使用Nvarchar默认
  4. 加上 SqlServerCodeFirstNvarchar = true这段代码

Expected behavior

Screenshots
53BLNG9U8WVHBCOB1CS(EJC
EFDCE116960AB0774869E6E63172A8B0
4a5e6d913fe8e8173d39243710e8719
69353133af413e97df146a5b7c0c5e4

@LemonNoCry
Copy link
Collaborator

中文乱码并未跟Navchar有直接关系
请检查数据库排序规则

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
好问题 Good for newcomers 已完成
Projects
None yet
Development

No branches or pull requests

3 participants