Problem with gzip compressing utf-8 encoded php page. HELP!
i use this at top of my php page:
if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
ob_start("ob_gzhandler");
else
ob_start();
when page is save with ANSI encoding page was compressed. but when i change page encoding to utf-8 compression was faild. please help!!!
i test compression on ww开发者_JS百科w.gidnetwork.com/tools/gzip-test.php
By guess is that you are including a BOM in your PHP source file when you save in UTF-8 and that's corrupting the compressed stream. Make sure you save in the file in UTF-8 without BOM.
精彩评论