现在,假设您指的是代码点,U+2B5EE 位于 BMP 之外(第一个 64K unicode 代码点),并且 mysql 似乎有 对它们的支持很少或根本不支持。所以我怀疑你运气不好。
First: your statement
UTF16 is U+2B5EE
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 of utf8 would fix your problem.
发布评论
评论(3)
MySQL
仅支持基本多语言平面中的字符(0x0000
-0xFFFF
)。如果这架飞机你的角色就出局了。
尝试存储同义词:)
更新:
MySQL 5.5.3
及以上版本(尚未正式发布)如果您使用UTF8MB4
编码。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.第一:你的陈述
稍有错误。
U+2B5EE
是 Unicode codepoint 的表示法,只是一个整数 - 一个抽象代码 - 而 UTF16 是一种字符集编码(可能的 Unicode 编码之一,就像 UTF -8)。现在,假设您指的是代码点,
U+2B5EE
位于 BMP 之外(第一个 64K unicode 代码点),并且 mysql 似乎有 对它们的支持很少或根本不支持。所以我怀疑你运气不好。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.自从这个问题发布后,MySQL 5.5.3 就发布了,它支持
utf8mb4
编码,提供完整的 Unicode 支持。切换到此字符集而不是 utf8 可以解决您的问题。我最近写了关于如何从 MySQL 切换的详细指南
utf8
到utf8mb4
。如果您按照那里的步骤操作,一切都应该正常工作。以下是该过程中每个步骤的直接链接:我怀疑您的问题可以按照第5步解决。希望这会有所帮助!
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!