On 2003/12/13, at 10:43, Steph wrote:

The real question is, what does mbstring do that iconv fails to do? And why
do we need to restore the initial form in any sense? And if iconv were
built-in, would mbstring still be needed, and if so, why and where?

I wrote we need to restore it to the initial form because we want to emulate exactly the same behaviour as the current fgetcsv() works. As fgetcsv() without a stream filter doesn't perform any conversion, so once we've turned the input into another encoding, then we have to turn it back. In this case, we're trying to convert strings encoded in an encoding other than UTF-8 into UTF-8 first, and parse it through fgetcsv(). Here what you get are UTF-8 version of these, which is unwanted. You might say the products will suffice even if they are UTF-8 encoded, however the conversion is sometimes irreversible, so we then need to avoid any conversion stuff.

("irreversible" means you would be supposed to lost some information
during the conversion.)

Moriyoshi

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



Reply via email to