Last active
August 29, 2015 14:00
-
-
Save jht5945/52e4df5770025c40e7b7 to your computer and use it in GitHub Desktop.
utf8mb4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// refer: | |
// http://zh.wikibooks.org/wiki/Unicode/20000-20FFF | |
// http://dev.mysql.com/doc/refman/5.0/en/string-functions.html | |
// https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-upgrading.html | |
mysql> create table test_x (value varchar(100)) default character set utf8mb4; | |
Query OK, 0 rows affected (0.04 sec) | |
mysql> insert into test_x values('𠀳'); | |
Query OK, 1 rows affected, 1 warnings (0.01 sec) | |
mysql> select length(value),char_length(value) from test_x; | |
+---------------+--------------------+ | |
| length(value) | char_length(value) | | |
+---------------+--------------------+ | |
| 4 | 4 | | |
+---------------+--------------------+ | |
1 rows in set (0.01 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment