Problems related to UTF-8 + BOM, fainting ~

Source: Internet
Author: User
UTF-8 + BOM problem, fainting ~~~ This post was last edited by u010572351 in 2013-07-1013:14:01 yesterday I asked such a question http://bbs.csdn.net/topics/390512808rear found the problem of UTF-8 + BOM, fainted ~~~
This post was last edited by u010572351 at 13:14:01 yesterday I asked such a question http://bbs.csdn.net/topics/390512808

It is indeed a problem of UTF8-BOM, but today there are new problems:

That is no BOM UTF-8 Chinese is garbled directly, UTF8 + BOM format Chinese normal, there is a bit messy.

1. the ob cache must be UTF8 and normal without BOM
2. a BOM is required for php with Chinese characters.


Now, do I need BOM or BOM ???? Which one should I select in general ???

Crash sharing:
------ Solution --------------------
Of course there is no bom.
What is the garbled text about? Describe your problems in detail.
------ Solution --------------------
The problem is that the default encoding of your browser is incorrect. for example, if UTF-8 is set in firefox by default, no garbled code is found whether the bom header is available or not. Instead, php garbled code is not specified for the gbk encoding of charset.
So
1. there should be no bom because bom affects front-end development.
2. specify the correct encoding header/meta


------ Solution --------------------
Reference:
The problem is that the default encoding of your browser is incorrect. for example, if UTF-8 is set in firefox by default, no garbled code is found whether the bom header is available or not. Instead, php garbled code is not specified for the gbk encoding of charset.
So
1. there should be no bom because bom affects front-end development.
2. specify the correct encoding header/meta

The third-floor solution does not contain garbled characters after encoding is declared on the page.

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.