LeonLatex Posted April 9, 2023 Share Posted April 9, 2023 So, what's the difference between UTF8 and UTF8mb4? Quote Link to comment https://forums.phpfreaks.com/topic/316104-whats-the-difference-between-utf8-and-utf8mb4/ Share on other sites More sharing options...
Solution Strider64 Posted April 9, 2023 Solution Share Posted April 9, 2023 1 hour ago, LeonLatex said: So, what's the difference between UTF8 and UTF8mb4? Don't know the real difference, but if you want to use emojis then UTF8mb4 is the way to go -> "Database character encoding: Ensure that your database is using the utf8mb4 character set and the utf8mb4_unicode_ci collation. This character set supports storing emojis and other Unicode characters properly." Though you still use `<meta charset="UTF-8">` in the HTML and set the following if you're using PDO -> $dsn = "mysql:host=localhost;dbname=your_database_name;charset=utf8mb4"; $pdo = new PDO($dsn, $username, $password); 1 Quote Link to comment https://forums.phpfreaks.com/topic/316104-whats-the-difference-between-utf8-and-utf8mb4/#findComment-1607144 Share on other sites More sharing options...
kicken Posted April 9, 2023 Share Posted April 9, 2023 The amount of bytes used to encode characters, and as a result the total amount of characters that can be encoded. 10.10.1 Unicode Character Sets 1 Quote Link to comment https://forums.phpfreaks.com/topic/316104-whats-the-difference-between-utf8-and-utf8mb4/#findComment-1607146 Share on other sites More sharing options...
LeonLatex Posted April 9, 2023 Author Share Posted April 9, 2023 Thank's guys 😊😊👍 Quote Link to comment https://forums.phpfreaks.com/topic/316104-whats-the-difference-between-utf8-and-utf8mb4/#findComment-1607147 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.