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