This is how my connection is set:
Connection conn = DriverManager.getConnection(url + dbName + "?useUnicode=true&characterEncoding=utf-8", userName, password);
And I'm getting the following error when tyring to add a row to a table:
Incorrect string value: 'xF0x90x8Dx83xF0x90...' for column 'content' at row 1
I'm inserting thousands of records, and I always get this error when the text contains xF0 (i.e. the the incorrect string value always starts with xF0).
The column's collation is utf8_general_ci.
What could be the problem?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…