java - 最近在学ssm框架在写Test的时候,不能插入中文数据,但是英文可以!求解啊!
迷茫
迷茫 2017-04-18 10:49:39
0
3
696

如图所示,一插入中文就保存,sql是????的!

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(3)
黄舟

Is the database character set correct?

巴扎黑

Is the data type specified by your dept_name a string type?

PHPzhong

I found the error. It turned out that I did not set the character encoding in the text fromatting in the Format when modeling and generating the database in PowerDesigner. I set it to utf-8 and regenerated the SQL to import the database successfully.
Reference: http://blog.csdn.net/qdzeac/a...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template