I believe that a lot of PHPer at the beginning will also have such doubts, after hitting the wall to sum up the following: A, UTF-8 this is a standard writing, in PHP and HTML set encoding, unified written UTF-8. Example: PHP? Phpheader (Content-Type: texthtml; charsetUTF-8 );? Metahttp-equivContent-Typecontentte in HTML
I believe that a lot of PHPer at the beginning will also have such doubts, after hitting the wall to sum up the following: A, UTF-8 this is a standard writing, in PHP and HTML set encoding, unified written UTF-8. Example: PHP? Php header ('content-Type: text/html; charset = UTF-8 ');? Meta http-equiv = "Content-Type" content = "te
I believe that many PHPer may have such doubts at the beginning. The following is a summary after hitting the wall:
One, "UTF-8" this is the standard writing, set the encoding in PHP and HTML, unified writing "UTF-8 ".
Example:
PHP --
HTML --
2. "utf8", "UTF-8", and "UTF8" are only case-insensitive in windows. Generally, they can be recognized by programs, but there are exceptions. For example, the abbreviated "UTF8" or "utf8" is not recognized in IE.
3. In the database command mode, you must write "utf8", because MySQL command mode can only recognize "utf8". For example, you can write in a PHP program:
Mysql_set_charset ('utf8', $ link );
?>
Conclusion: MySQL uses "utf8" [mysql_query (set names utf8)] and "UTF-8" for others ".