Search code examples
mysqlunicodeutf8mb4

MySQL don't want to store unicode character


Why won't MySQL store the unicode character 𫗮? Yes, it is a rare hieroglyph, you wouldn't see it in the browser.
UTF16 is U+2B5EE

Warning: #1366 Incorrect string value: '\xF0\xAB\x97\xAE' for column 'ch' at row 1

Is it possible to store this character in MySQL?


Solution

  • MySQL only supports characters from the basic multilingual plane (0x0000 - 0xFFFF).

    Your character is out if this plane.

    Try storing a synonym instead :)

    Update:

    MySQL 5.5.3 and on (which has not gone GA yet) does support supplementary characters if you use UTF8MB4 encoding.