From:             haha_lover at 163 dot com
Operating system: winxp / linux-2.6.11-1.1369_FC4
PHP version:      5.2.1
PHP Bug Type:     Output Control
Bug description:  ob_start("ob_iconv_handler")  can't do nesting! 

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&#65306;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&#29992;&#20110;&#26356;&#25913;&#25968;&#25454;&#24211;&#30340;&#20840;&#23616;&#29305;&#24615;&#12290;
</p>
<?
ob_start("ob_iconv_handler");
?>
<p>
    ALTER
DATABASE&#29992;&#20110;&#26356;&#25913;&#25968;&#25454;&#24211;&#30340;&#20840;&#23616;&#29305;&#24615;&#12290;
</p>
<?
ob_end_flush();
ob_end_flush();
?>



Expected result:
----------------
 ALTER
DATABASE&#29992;&#20110;&#26356;&#25913;&#25968;&#25454;&#24211;&#30340;&#20840;&#23616;&#29305;&#24615;&#12290;

ALTER
DATABASE&#29992;&#20110;&#26356;&#25913;&#25968;&#25454;&#24211;&#30340;&#20840;&#23616;&#29305;&#24615;&#12290;


Actual result:
--------------
 ALTER
DATABASE&#29992;&#20110;&#26356;&#25913;&#25968;&#25454;&#24211;&#30340;&#20840;&#23616;&#29305;&#24615;&#12290;

ALTER DATABASE

-- 
Edit bug report at http://bugs.php.net/?id=40887&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40887&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40887&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40887&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40887&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40887&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40887&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40887&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40887&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40887&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40887&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40887&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40887&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40887&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40887&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40887&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40887&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40887&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40887&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40887&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40887&r=mysqlcfg

Reply via email to