Answer the question
In order to leave comments, you need to log in
Why can't MySQL store a string with emoji characters?
Good afternoon.
There is a MySQL database with utf8mb4 encoding. I am writing an application in JAVA + Hibernate, immediately after creating the SessionFactory I write the following code (I found such an example somewhere on the net):
NativeQuery query = createNativeQuery("SET NAMES 'utf8mb4'");
query.executeUpdate();
Incorrect string value: '\xF0\x9F\x87\xA9\xF0\x9F...' for column 'name' at row 1
Answer the question
In order to leave comments, you need to log in
I can assume that they forgot to put utf8mb4 in the encoding of some field
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question