xampp-win32-1.7.4-VC6 中phpmyadmin mysql 数据库中字符集 utf8mb4是啥玩意,和utf8有啥区别?谢谢
发布网友
发布时间:2022-05-16 11:09
我来回答
共2个回答
热心网友
时间:2023-10-20 16:35
以下是官方说明,大概意思是UTF8存储每个字符最大使用3个字节,而utf8mb4存储每个字符 最大可以使用4个字节。有些UTF8无法存储的utf8mb4就可以。下面的英文可以自己再看一下
The utf8mb4 Character Set (Four-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 and utf8mb4 have identical storage characteristics: same code values, same encoding, same length.
•
For a supplementary character, utf8 cannot store the character at all, while utf8mb4 requires four bytes to store it. Since utf8 cannot store the character at all, you do not have any supplementary characters in utf8 columns and you need not worry about converting characters or losing data when upgrading utf8 data from older versions of MySQL.
参考资料:http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html
热心网友
时间:2023-10-20 16:36
数据库不支持utf8mb4字符集。
你先检查你页面中使用的编码是不是utf-8,可能你写错了,然后在mysql目录下的my.ini文件中,把default-character-set全部改成utf8,重新启动mysql服务。追问在数据库表中创建新字段时候 有个选择字符集的 选项 以前没有utf8mb4 现在有了,我就想知道这个utf8mb4是啥玩意。数据库肯定支持这种字符集
追答这个真不太了解了 估计跟UTF-8差不多吧