Why won't MySQL store the unicode character
相关问题
- sqlyog export query result as csv
- NOT DISTINCT query in mySQL
- MySQL: conduct a basic search
- Why sometimes there is one of more gap(s) in the v
- mySQL alter table on update, current timestamp
First: your statement
is slightly wrong.
U+2B5EE
is the notation for a Unicode codepoint, just a integer number- an abstract code- while UTF16 is a charset encoding (one of possible Unicode encodings, as is UTF-8).Now, assuming that you mean the codepoint,
U+2B5EE
is outside the BMP (first 64K unicode codepoints), and it seems mysql have little or no support for them. So I suspect you are out of luck.Since this question was posted, MySQL 5.5.3 was released which supports the
utf8mb4
encoding which offers full Unicode support. Switching to this charset instead ofutf8
would fix your problem.I’ve recently written a detailed guide on how to switch from MySQL’s
utf8
toutf8mb4
. If you follow the steps there, everything should work correctly. Here are direct links to each individual step in the process:I suspect that your problem can be solved by following step 5. Hope this helps!
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 useUTF8MB4
encoding.