I am executing this query
insert into tbl (name) values('Î');
When I execute this query from my application with jdbc then I get following error
Incorrect string value: '\xEF'
If I execute same query with Sql Manager for MySql then it executes successfully
开发者_Python百科my jdbc connection string is like this
jdbc:mysql://localhost:3306/mydb?useUnicode=yes&characterEncoding=UTF-8
any idea where am I wrong ?
your mysql instance might not be configured to accept your character set. Im not an expert but i saw this in the mysql documentation
ALTER TABLE myTable MODIFY myColumn VARCHAR(255) CHARACTER SET utf8;
found here
精彩评论