ip2long Posted June 11, 2007 Share Posted June 11, 2007 Hello! Prompt the decision of my problem. I do a site, and I use sheaf XML + XSLT (all files in the coding utf-, under Windows. A problem: at the established coding of a conclusion in a xslt-pattern distinct from utf-8, for example windows-1251 I receive symbols BOM in a conclusion of the buffer. To get rid of it to me function does not help: ob_start ('ob'); function ob ($buffer) { //kill byte order mark $buffer = preg_replace ('@\xef\xbb\xbf@', ", $buffer); return trim ($buffer); } It is very strange as if to check so: $firstchar = substr ($buffer, 0, 1); the first symbol will be ` <` - in my case it ` <! DOCTYPE ht... `, that is after work of a method transformToXML in a conclusion it is impossible to define presence BOM (and it there is)! As the conclusion turns out in the coding windows-1251, and in the buffer remains BOM a browser breaks display, including what it to it has come utf-8. It is inconvenient me manually delete BOM from files php as periodically I hands correct them in a notepade for windows. Why it is not visible BOM in buffer? Quote Link to comment https://forums.phpfreaks.com/topic/55082-bite-order-mark/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.