The difference between utf8 and utf8mb4

New items only consider utf8mb4

  UTF-8 encoding is a variable-length encoding schemes can be from 1 to 4 bytes to store characters.

  Because the problems left over by history, MySQL is not the real utf8 encoding UTF-8, but castrated version, up only 3 bytes. When faced with accounting UTF-8 encoding four bytes, for example emoji characters or complex Chinese characters, it is what we usually send in the chat small yellow face expression, can cause abnormal memory.

  5.5.3 From the start, MySQL began utf8mb4 coding to achieve full UTF-8, which represents mb4 most bytes 4, up to 4 bytes for compatible four-byte Unicode (Unicode). utf8mb4 is an extension of utf8. From then 8.0, a version will be started utf8mb4 as the default character encoding.

  

  Links: https://blog.csdn.net/kikajack/article/details/84668924 , https://blog.csdn.net/u010584271/article/details/80835547

Guess you like

Origin www.cnblogs.com/syx0610/p/11822144.html