Re: Eliminatimg PHP UTF-8 BOM in a returned stream to a Mobile App

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/4/12 Eli Orr <eli.orr@xxxxxxxxxxxx>:
> Dear PHP Gurus,
>
> I would like to Eliminate the 3 UTF-8 BOM enforced on my returned BLOB:
>
> The PHP server adds Âutf-8 BOM (UTF-8 Byte Order Mark Â- in the beginning of
> UTF-8 Âfiles) which
> consists of three bytes: EF BB BF.
>
> The Mobile App served by the server Does not need that. How can I eliminate
> it??
>
> Thanks.
>
> UTF-8 Byte Order Mark â BOM:
> http://unicode.org/faq/utf_bom.html#BOM
>
> Best Regards,
>
> Eli ÂOrr
> CTOÂ& Founder
> Mimmage.com
> My virtual vCard
> LogoDial Ltd.
> M:+972-54-7379604
> O:+972-74-703-2034
> F: +972-77-3379604
>
> Plaut 10, Rehovot, Israel
> Email:ÂÂ Eli.Orr@xxxxxxxxxxxx
> Skype:Â eliorr.com
>
>
> -----
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Can you show us the PHP script that DOES output the BOM?

Normally, PHP doesn't do this automatically (AFAIK). The main reason
being is that it is often the case that the BOM appears in the source
code file before the <?php opening tag, so would block headers
(session cookie for example).

If a BOM is being issued by PHP, it is being done programmatically, or
is being missed due to the initial source code file having the BOM
set.

See http://docs.php.net/manual/en/function.session-start.php#102431,
http://docs.php.net/manual/en/function.header.php#95864, etc.

Now. Having said all of that, you may find you are using some sort of
output buffering and that is setting the BOM after the headers are
sent.

But, as it stands, PHP will not be generating the BOM for you.

-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux