Answer the question
In order to leave comments, you need to log in
What is the encoding for the database?
In general, the task in the database is to store text with all sorts of emoticons. Googled it, set encoding from utf8 to utf8mb4. All OK. But then there was such a problem, a smile appeared: which does not want to be written to the database. This one is normal: ✅, but this one is not: *here_was_to_be_smiley_but_it_is_cut_after_publication* - incorrect value error. It is also not displayed in a text editor, but is written as \uD83D \uDCCC .
What encoding should be used for it?
PS: Oh, after posting the question here, it doesn't show up either.
Answer the question
In order to leave comments, you need to log in
What encoding did you change - bases, tables or columns?
\uD83D \uDCCC is a High surrogate / Low surrogate pair
10000 16 + 400 16 * (D83D 16 - D800 16 ) + (DCCC 16 - DC00 16 ) = 1F4CC 16
"Pushpin" character,
Googled it, set encoding from utf8 to utf8mb4.
MariaDB [(none)]> SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+------------------------+
| Variable_name | Value |
+--------------------------+------------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| collation_connection | utf8mb4_unicode_520_ci |
| collation_database | utf8mb4_unicode_520_ci |
| collation_server | utf8mb4_unicode_520_ci |
+--------------------------+------------------------+
10 rows in set (0.01 sec)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question