On 06/06/16 22:33, Sammy Kaye Powers wrote: > But the real hum-dinger was from Stack Overflow: > > http://stackoverflow.com/search?q=php+bom > > It does seem to be tripping up a lot of people, especially newbies. As > low as the learning curve is for PHP already, I'm curious if you folks > think it's advantageous to have PHP ignore the BOM in std out in the > case of `{U+FEFF}<?php` to remove another stumbling block.
BUT is this actually anything to do with BOM? >From stackoverflow http://stackoverflow.com/questions/35549518/php-import-csv-file-utf8-with-bom Check the answer. I'm not saying PHP handles UTF8 properly, but most of the problems tend to be more to do with the source file encoding rather than PHP? The majority of the answers even from years back are 'don't use BOM' but I am curious where the \u{feff} comes from in your original post since the UTF8 BOM is \u{efbbbf} and anything else should be stripped. The starting point should perhaps be http://unicode.org/faq/utf_bom.html which acknowledges that it's use can be a problem and specifically ... Some byte oriented protocols expect ASCII characters at the beginning of a file. If UTF-8 is used with these protocols, use of the BOM as encoding form signature should be avoided. Which is where the advise not to use them comes from ... -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php