|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-03-22 04:03 UTC] haha_lover at 163 dot com
Description:
------------
ob_start() can nest as the description in php manual:
"Output buffers are stackable, that is, you may call ob_start() while another ob_start() is active."
But ob_start("ob_iconv_handler") CAN'T.
Reproduce code:
---------------
<?php
/**
* Test: Can I nest ob_start("ob_iconv_handler") ?
*
* Result:I can't. It stop at internal nesting when meet a Chinese word.
*/
iconv_set_encoding("internal_encoding", "GB2312");
iconv_set_encoding("output_encoding", "UTF-8");
ob_start("ob_iconv_handler");
?>
<p>
ALTER DATABASE用于更改数据库的全局特性。
</p>
<?
ob_start("ob_iconv_handler");
?>
<p>
ALTER DATABASE用于更改数据库的全局特性。
</p>
<?
ob_end_flush();
ob_end_flush();
?>
Expected result:
----------------
ALTER DATABASE用于更改数据库的全局特性。
ALTER DATABASE用于更改数据库的全局特性。
Actual result:
--------------
ALTER DATABASE用于更改数据库的全局特性。
ALTER DATABASE
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 22:00:02 2025 UTC |
PS: bugs.php.net submitting has done htmlentities() to the Chinese words in my program. If you use this encoded program code , the ob_start("ob_iconv_handler") can work in nestings. But after all, I can't write my templates in this htmlentities style.