问题:使用executeUpdate向数据库中插入数据时,中文显示为问号
解决方法:在连接数据库的url: "jdbc:mysql://localhost:3306/ManageSystem"后加上
?useUnicode=true&characterEncoding=UTF-8
即"jdbc:mysql://localhost:3306/ManageSystem?useUnicode=true&characterEncoding=UTF-8"
问题:使用executeUpdate向数据库中插入数据时,中文显示为问号
解决方法:在连接数据库的url: "jdbc:mysql://localhost:3306/ManageSystem"后加上
?useUnicode=true&characterEncoding=UTF-8
即"jdbc:mysql://localhost:3306/ManageSystem?useUnicode=true&characterEncoding=UTF-8"