Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: Twice UTF-8 byte-order mark (BOM) Date: Sat, 5 Jan 2019 11:04:55 +0100 Lines: 33 Message-ID: References: <82a7cd23-82be-4611-a691-e0edcf8c30d6@googlegroups.com> <241220181649060212%timstreater@greenbee.net> <5c212055$0$22357$e4fe514c@news.xs4all.nl> <34632309-6e9e-49c5-9123-c947347b789e@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net wsOPfvWD6owSGr7HUKgVrgTG/+joOhx8PtCNS2BvTeJIxCK9K4 Cancel-Lock: sha1:hBOJDN43GSjqo4HKiPzA2GrQ3kg= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 In-Reply-To: <34632309-6e9e-49c5-9123-c947347b789e@googlegroups.com> Content-Language: en-GB Xref: csiph.com comp.lang.php:17861 On 1/4/19 5:29 PM, vfhhutt45hghjjdewrghb@gmail.com wrote: > Am Mittwoch, 26. Dezember 2018 15:41:06 UTC+1 schrieb J.O. Aho: >> As long as it begins with > is put before the > php engines control. >> > > I understand the modus operandi but I think it's not a good way. UTF-8 should be used as a norm. And the BOM is part of a UTF-8 file. In other cases (without BOM) it is a ISO 8859-1 file or anything else. The BOM was just an addition for issues in some lesser operating systems, in newer versions like UTF-16 BOM has been removed from the standard. > I'm wondering that not everybody have my problems. To include the DB conneting data is a normal procedure for security reasons and for usability. Not everyone uses a lesser OS and have BOM enabled in text editors. > Maybe php should filter the BOM if "include" is used?! PHP do not know what your intention is with the file, say you are generating some data inside a UTF-8 BOM document, then you don't want it to be stripped. Just do the sensible thing and say no to BOM as there are other ways to identify your file as UTF-8, and if you don't use UTF-8 characters in your text, then it's just plain ASCII and has no use of BOM in anyway. -- //Aho