utf8mb4和utf8区别
来源:互联网 发布:java 文件服务器框架 编辑:程序博客网 时间:2024/05/22 03:15
http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
utf8mb4比utf8支持更多的字符????
10.1.10.6 The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding)
The character set named utf8
uses a maximum of three bytes per character and contains only BMP characters. As of MySQL 5.5.3, the utf8mb4
character set uses a maximum of four bytes per character supports supplemental characters:
For a BMP character,
utf8
andutf8mb4
have identical storage characteristics: same code values, same encoding, same length.For a supplementary character,
utf8
cannot store the character at all, whileutf8mb4
requires four bytes to store it. Sinceutf8
cannot store the character at all, you do not have any supplementary characters inutf8
columns and you need not worry about converting characters or losing data when upgradingutf8
data from older versions of MySQL.
utf8mb4
is a superset of utf8
, so for an operation such as the following concatenation, the result has character set utf8mb4
and the collation of utf8mb4_col
:
SELECT CONCAT(utf8_col, utf8mb4_col);
Similarly, the following comparison in the WHERE
clause works according to the collation of utf8mb4_col
:
SELECT * FROM utf8_tbl, utf8mb4_tblWHERE utf8_tbl.utf8_col = utf8mb4_tbl.utf8mb4_col;
Tip: To save space with utf8mb4
, use VARCHAR
instead of CHAR
. Otherwise, MySQL must reserve four bytes for each character in a CHAR CHARACTER SET utf8mb4
column because that is the maximum possible length. For example, MySQL must reserve 40 bytes for a CHAR(10) CHARACTER SET utf8mb4
column
- utf8mb4和utf8区别
- mysql中utf8和utf8mb4区别
- mysql中utf8和utf8mb4区别
- mysql中utf8和utf8mb4区别
- mysql中utf8和utf8mb4区别
- MySQL中utf8和utf8mb4的区别
- mysql中utf8和utf8mb4区别
- MySQL中utf8和utf8mb4的区别
- utf8mb4和utf8
- mysql中字符集 utf8 和utf8mb4 有什么区别?
- mysql中字符集 utf8 和utf8mb4 有什么区别?
- utf8mb4与utf8的区别
- utf8mb4与utf8的区别
- utf8mb4与utf8的区别
- mysql中database库和tables表中字符集 utf8 和utf8mb4 有什么区别?
- 辛星浅析utf8和utf8mb4
- utf8mb4 -- UTF-8 Unicode和utf8 -- UTF-8 Unicode区别的整理
- Mysql中,utf8mb4与utf8字符集的区别
- ELKStack插件Json编码
- paho c客户端如何输出log
- ecplise中git项目的导入
- 计算机是如何启动的
- 18个配色(色彩搭配)资源网站——设计师福利
- utf8mb4和utf8区别
- Xcode7编译遇到building for iOS simulator, but linking in object file built for OSX, for architectu问题解决方案
- 遗传算法入门
- MongoDB可以歇菜了吗
- 函数的参数和函数调用
- request.getDispatcher().forward(request,response)和response.sendRedirect()的区别
- 美丽地图 从细节做起(一)
- 转载_Git分支管理策略
- Java加密技术(一)——BASE64与单向加密算法MD5&SHA&MAC