func/006.phpt fails with new output control code

From: Date: Tue, 06 Jun 2006 11:30:02 +0000
Subject: func/006.phpt fails with new output control code
Groups: php.internals 
Request: Send a blank email to internals+get-23969@lists.php.net to get a copy of this message
Hi, Tony noticed that func/006.phpt fails with the new output control code. The test assumes that the buffer returned by ob_get_contents() is unicode when unicode_semantics=1. I think the test and previous behaviour are wrong. Though everything reaching the output layer should be in output_encoding, we cannot know if the output handler buffer we are going to return came from another output handler and what transformations it did to it. Thus, ob_get_contents() always returns a binary string. See also tests/output/ob_016.phpt Another undiscussed issue is that output handlers receive binary only strings, too, of course, but in a controlled environment the developer should probably always know what she's going to get passed in the output handler so she can convert it to unicode if needed. Opinions, thoughts, flames? :) Regards, -- Michael

« previous php.internals (#23969) next »