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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to