Checklist for Problems with character/charset/collation
Including mysql
, mysqli
, PDO
Content
- DISCLAIMER
- My insert's in my DB doesn't work properly! What can i do?
- Change Charset and Collation of a Database or Table
- Set the encoding of your skript files
- Set the charset of your page with php or meta tag
- What's the difference between UTF8 and UTF8mb4?
- Answer to this specific Question
- Further Information/Additional Links
- Side Notes
1. DISCLAIMER
This Answer should not only answer this question, also should the answer be a bit more extensive, so more people find faster a bundled and good answer!
!Important Notice!
If you change something in your Database always make sur you have a backup of your database! Check it 2 times, or 3!
I'm open for improvements and comments, such as error corrections.
In addition I apologize if the grammar is not perfect: D
If you get stuck on a question like this:
- Php + Mysql (UTF-8, utf8mb4) some characters are still bug
- How to convert an entire MySQL database characterset and collation to UTF-8?
- “Incorrect string value” when trying to insert UTF-8 into MySQL
- Change MySQL default character set to UTF-8 in my.cnf?
- Using utf8mb4 with php and mysql
- PDO + MySQL and broken UTF-8 encoding
- Error in insertion data in php Mysql
- PHP PDO: charset, set names?
- SET NAMES utf8 in MySQL?
- PHP mysql charset utf8 problems
- UTF-8 all the way through
- Manipulating utf8mb4 data from MySQL with PHP
- ERROR 1115 (42000) : Unknown character set: 'utf8mb4' in mysql
...then my answer maybe helps you!
2. My insert's in my DB doesn't work properly! What can i do?
If your insert's doesn't work properly an your inserted data looks something like this in your database then this could have various reasons!
Examples:
??????????