Utf-8+bom about the problem, fainted ~

Source: Internet
Author: User
Utf-8+bom's problem, fainted ~ ~ ~
This post was last edited by u010572351 on 2013-07-10 13:14:01

Yesterday I asked such a question http://bbs.csdn.net/topics/390512808

It is true that Utf8-bom is a problem, but today there are new problems:

that is no BOM UTF-8 Chinese directly is garbled, Utf8+bom format Chinese Normal, the existing a bit messy.

1.OB cache to UTF8 without BOM only normal
2. PHP with Chinese should have BOM only normal


now, I really want to have a BOM or no BOM???? In general, which should be chosen???

Collapse

Share to:


------Solution--------------------
No BOM, of course.
What do you mean, garbled? Describe the problem you are experiencing in detail.
------Solution--------------------
The problem is that the default encoding problem in your browser, like my Firefox default set utf-8, whether there is no BOM header, will not garbled, instead of specifying charset GBK code PHP has garbled
So
1. There should be no BOM, because BOM affects the front-end development
2. Specify the correct encoding Header/meta


------Solution--------------------
Reference: The
problem is out of your browser default encoding problem, like my Firefox default set utf-8, whether there is no BOM header, will not garbled, instead of specifying charset GBK code PHP has garbled
So
1. There should be no BOM, because BOM affects the front-end development
2. Specify the correct encoding Header/meta

Third floor positive solution, on the page after the declaration of the Code will not appear garbled
  • 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.