We need to automatically convert the output as internally we will be storing UTF-16 which is not what you want to send to the user. The SAPI output mechanism does the conversion, I don't think it's print & echo. It will actually save people a lot of headache that this is done automatically. As far as files are concerned, the default is also to convert to the INI encoding (forgot which INI parameter), but we will supply streams which allow you to control the in/out encoding of specific files.

So basically, I think we need to update the doc as I am pretty sure we didn't change print/echo but the underlying input/output mechanisms.

Andi


At 02:54 PM 8/10/2005 +0400, Antony Dovgal wrote:
On Wed, 10 Aug 2005 12:45:27 +0200
"Ron Korving" <[EMAIL PROTECTED]> wrote:

> This looks very promising, I'm impressed by the work you guys have done (big
> thumbs up).
>
> There are a few issues/questions I have after reading your document:
>
>
> "Therefore, command such as 'print' and 'echo' automatically convert their
> arguments to the specified encoding. No automatic output encoding is
> performed for anything else."

That's actually something I wanted to ask about too.

Do we really need such kind of magic?

I think it may be pretty confusing when after echo'ing or print'ing a variable
you can see one output, but after writing the very same variable into a file
you can see something completely different.

IMO it's similar to what we have with __toString() ATM.
Yes, it's documented, but it's *still* confusing that there is some magic
involved in one case and there is no magic in an other, almost similar case.

--
Wbr,
Antony Dovgal

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

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

Reply via email to