In this post
, I was trying to make a distinction between SNROM with battery and SNROM without battery by including the Unicode character BATTERY (U+1F50B)
. I can preview the post just fine:
File comment: Preview works fine.
sgemoji.png [ 756 Bytes | Viewed 1632 times ]
But when I try to post I get this error:
SQL ERROR [ mysqli ]
Incorrect string value: '\xF0\x9F\x94\x8B\x0A\x0A...' for column 'post_text' at row 1 
it appears MySQL by default does not support UTF-8 code unit sequences that correspond to Unicode code points outside the Basic Multilingual Plane (U+0000 through U+FFFD). In GTK+ applications, this character can be typed with Ctrl-Shift-U 1f50b Space. A related question on Stack Overflow is “Incorrect string value” when trying to insert UTF-8 into MySQL via JDBC?
which implies that certain settings will need to be flipped from utf8
(BMP-only UTF-8) to utf8mb4
(UTF-8 including extra planes, the NES 2.0 of Unicode), which was introduced in MySQL 5.5.