KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following string value: "walmart obama " I am using MySQL and Java. I am getting the following exception: `java.sql.SQLException: Incorrect string value: '\xF0\x9F\x91\xBD\xF0\x9F...' Here is the variable I am trying to insert into: var1 varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL` My Java code that is trying to insert "walmart obama " is a preparedStatement. So I am using the setString() method. It looks like the problem is the encoding of the values . How can I fix this? Previously I was using Derby SQL and the values just ended up being two sqaures (I think this is the representation of the null character) All help is greatly appreciated!
Tags (comma-separated)
Save Edits
Cancel