& Quot; UTF-8 & quot;, & quot; UTF8 & quot;, & quot; UTF-8 & quot;, & quot; utf8 & quot;

Source: Internet
Author: User

"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 ".

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.