What is this magical character for analysis?

Source: Internet
Author: User
Keywords html notepad include txt php
When I write PHP, I first output a section of HTML and include () a file (no output), and then continue to output a piece of HTML, then in the final output of the HTML within the Include section will appear a strange thing, resulting in a Web page exception. After my analysis, it is not known how to appear this one character, to find out what character this is.

File Download link Magic character (open with notepad++). txt Open with Notepad is not see that character, with notepad++ can see.

Reply content:

1,hex Editor
Open for EF BB BF EF BB BF
2, open Google a search will know.
    1. The content is UTF-8 's BOM, which indicates what byte order this file is in. Multibyte encoding needs to explain its own order to prevent ambiguity. The BOM is the function. However, UTF-8 does not require a byte order description. (Refer to UTF-8 encoding). All UTF-8 BOMs are actually optional. There are also standards that can be resolved. But it also leads to disagreements.
    2. If other editors, mistakenly think that the other encoding format, then can also be forced to parse out, out of a variety of garbled.
3, combined with your problem, it is very simple, this is the output of PHP, always with the reason of BOM.
I haven't used PHP, but I've also discussed how to get rid of BOM output. Take a look at it.
Api-how to remove%EF%BB%BF in PHP string
----
There is a more reliable answer to this question.
I just handy download down, since read, that is, write it down.
----
Magic is a very annoying word,
It means you don't analyze the problem, and you don't know how to deal with it at all. Even more can not find a way to locate the problem, why use to talk about solving problems.
(The above is not to say that the question, but the combination of their own side of things feeling a piece)
Give up the magic of the word, and do not chicken the problem of the blind touch. or change to change, the dream program suddenly magically normal. Learn to position, analyze, and solve problems. Bom:byte Order Mark
UTF-8 BOM is also called UTF-8 signature, in fact, UTF-8 BOM to UFT-8 has no effect, is to support utf-16,utf-32 to add the Bom,bom signature means to tell the editor what encoding the current file, convenient editor identification, But although the BOM is not displayed in the editor, but will produce output, like a blank line if the file is not many, or just the cause of the new file, re-save, save the time to choose UTF-8 No BOM, or not UTF-8 with the BOM, some editors are in the "settings" Inside set save whether with BOM header. UTF-8 I got you this file, open (OS X, TextMate 2) See is

Unicode Character ' ZERO WIDTH no-break SPACE ' (U+feff)

I did a search and I saw this on the wiki
UTF -16 of the Code mode
UTF-16 Large-tailed sequence and small-tail-sequence storage form are used. In general, the Macintosh made or stored text using the large-tailed sequence format to Microsoft the text that is made or stored is formatted with a small tail order.
in order to figure out the size of the UTF-16 file, at the beginning of the UTF-16 file, a U+feff character is placed as the byte order Mark (Utf-16le with the FF FE representative , Utf-16be is represented by FE FF) to show that this text file is encoded in UTF-16, where the U+feff character in Unicode represents the meaning of zero WIDTH no-break space, which is a blank without any width or word.

Anyway, the rest of you search for it yourself.
  • 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.