"UTF-8", "UTF8", "UTF-8", "utf8" between the difference, utf-8utf8
Essentially, there is no difference.
1. "UTF-8" is a standard writing;
2. In Windows, English is case-insensitive, so it can also be written as "UTF-8 ";
3. "UTF-8" can also be omitted in the middle of the "-", written as "UTF8 ". Generally, the program can be identified, but there are also exceptions (as follows ):
To be strict, it is best to use standard capital "UTF-8 ".
Only "utf8" can be used in MySQL Databases"
In MySQL command mode, only "utf8" can be used, and "UTF-8" cannot be used. That is to say, "set names utf8 (without a small horizontal bar)" can be used in PHP programs )", if you add "-", this command will not take effect, but add "-" to the header in PHP, because IE does not know the "utf8", the reason is described below.
4. Only UTF-8 can be used in IE browsers"
If "utf8" is used in IE, the page may be blank or garbled.
But in other browsers is normal, because: other browsers use the default UTF-8 encoding, if the page encoding cannot be identified will be decoded with the default UTF-8, however, the default IE encoding is GB2312, so the default encoding is ..... (Other browsers refer to "FireFox", "Chrome", and "Opera ")
Summary
[Only in MySQL can use the "UTF-8" alias "utf8", but in other places all use uppercase "UTF-8 ".]
Specifically:
Uppercase "UTF-8" is used outside the command "mysql_query (set names utf8 ".