Contents
Do you have to be UTF-8 aware for MySQL?
at this point your MySQL client and server should be in UTF-8 (see my.cnf ). remember any languages you use (such as PHP) must be UTF-8 as well. Some versions of PHP will use their own MySQL client library, which may not be UTF-8 aware.
What’s the Default Charset for UTF-8 in MySQL?
MySQL 4.1 and above has a default character set that it calls utf8 but which is actually only a subset of UTF-8 (allows only three-byte characters and smaller). Use utf8mb4 as your charset if you want “full” UTF-8.
How to set UTF-8 as the encoding type for PHP?
To be sure that your PHP code plays well in the UTF-8 data encoding sandbox, here are the things you need to do: Set UTF-8 as the character set for all headers output by your PHP code Specify UTF-8 as the encoding type for XML Strip out unsupported characters from XML Specify UTF-8 as the character set for all HTML content
What is the default character set in MySQL?
Verify that they’re all utf8, except …_filesystem, which should be binary and …_dir, that points somewhere in the MySQL installation. MySQL 4.1 and above has a default character set that it calls utf8 but which is actually only a subset of UTF-8 (allows only three-byte characters and smaller).
What’s the difference between UTF8 general and collation in MySQL?
For more information, see Database Character Set and Collation in the MySQL Reference Manual. Note that utf8_general_ci is no longer recommended best practice. See the related Q & A: What’s the difference between utf8_general_ci and utf8_unicode_ci on Stack Overflow.
How can I create a database with charset utf-8 like I did in navicat? …seems to be using some kind of default charset. For more information, see Database Character Set and Collation in the MySQL Reference Manual. Note that utf8_general_ci is no longer recommended best practice.