Menu
About me Kontakt

Are you using MySQL? Do not use UTF8 encoding. Replace it with 'UTF8mb4' - an explanation of why

The article discusses an important issue regarding character encoding in MySQL, particularly in the context of web applications. The author highlights that the default encoding in MySQL is 'utf8', which actually only supports characters from the U+0000 to U+FFFF range. This limitation means that some characters, like emojis, which fall in the U+10000 range and above, cannot be used. Therefore, it is crucial to switch to 'utf8mb4', which can capture all Unicode characters, ensuring full text support. Transforming the database to 'utf8mb4' is relatively straightforward, but it requires certain steps that the author outlines in detail. In summary, changing the encoding to 'utf8mb4' is a key step for any application that needs complete Unicode character support.