Re: Prompt the decision of my problem

From: Date: Wed, 13 Jun 2007 14:07:42 +0000
Subject: Re: Prompt the decision of my problem
References: 1  Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-35693@lists.php.net to get a copy of this message
You are asking the wrong guys :) Please have a look at http://php.net/contact -Hannes On 6/11/07, Alexander Myadzel <ip2long@gmail.com> wrote:
Hello! Prompt the decision of my problem. I do a site, and I use sheaf XML + XSLT (all files in the coding utf-8), 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?


« previous php.mirrors (#35693) next »