“Incorrect string value” when trying to insert UTF-8 into MySQL via JDBC?

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: ‘\xF0\x90\x8D\x83\xF0\x90…’ for column ‘content’ at row 1 I’m inserting thousands of records, and I always get this error when the … Read more

What is the difference between utf8mb4 and utf8 charsets in MySQL?

What is the difference between utf8mb4 and utf8 charsets in MySQL? I already know about ASCII, UTF-8, UTF-16 and UTF-32 encodings; but I’m curious to know whats the difference of utf8mb4 group of encodings with other encoding types defined in MySQL Server. Are there any special benefits/proposes of using utf8mb4 rather than utf8? 5 Answers … Read more