2

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

my jdbc connection string is like this

jdbc:mysql://localhost:3306/mydb?useUnicode=yes&characterEncoding=UTF-8

any idea where am I wrong ?

1
  • Can you please post the code that performs the query? Also, can you verify if the same statement returns the correct value from the mysql console? Commented Jun 11, 2011 at 16:03

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.