Re: Unicode progress [Was: unicode.semantics ad infinitum]
| From: | Andrei Zmievski | Date: | Fri, 23 May 2008 18:47:13 +0000 |
| Subject: | Re: Unicode progress [Was: unicode.semantics ad infinitum] | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37837@lists.php.net to get a copy of this message | ||
UG(ascii_conv) is for the format string, not the arguments. The warning is thrown by this code:
convert_to_string_ex(argv[currentarg]);It should check the arg type and return with a warning if it's Unicode. -Andrei Steph Fox wrote:
It does - 'UG(ascii_conv)' - but sometimes there's a unicode-to-binary conversion warning thrown by that, and then you have to cast the variable to a binary empty string to suppress the warning before you assign the pack() result to it. (See ext/phar/tests/phar_test.inc.) There are similar issues with unpack(), and with fwrite()/fread() and friends when dealing with a purely binary string. What concerns me at this point is that we could and should be telling PHP users how to future-proof their code during the move from PHP 4 to PHP 5. If we can get a fix on that now and get word out, we'll have made their future migration path *much* smoother. - Steph