On Tue, 19 Sep 2006 16:34:05 +0200
[EMAIL PROTECTED] (Michael Wallner) wrote:

> Derick Rethans wrote:
> > On Tue, 19 Sep 2006, Antony Dovgal wrote:
> > 
> >>>> http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/tests/002.phpt?r1=1.2&r2=1.3&diff_format=u
> >>>> Index: php-src/ext/libxml/tests/002.phpt
> >>>> diff -u php-src/ext/libxml/tests/002.phpt:1.2
> >>>> php-src/ext/libxml/tests/002.phpt:1.3
> >>>> --- php-src/ext/libxml/tests/002.phpt:1.2        Tue Jun 27
> >>>> 22:54:29 2006 +++ php-src/ext/libxml/tests/002.phpt      Tue
> >>>> Sep 19 12:06:49 2006 @@ -16,7 +16,7 @@
> >>>>     </movies>
> >>>>  XML;
> >>>>  
> >>>> -$doc = simplexml_load_string($xmlstr);
> >>>> +$doc = simplexml_load_string((binary)$xmlstr);
> >>>>  $xml = explode("\n", $xmlstr);
> >>> You shouldn't have to do this actually... as the original code
> >>> should just still work fine.
> >> But it doesn't, because SimpleXml REQUIRES binary string.
> >> I don't understand why and I don't like it either, but that's what
> >> we have.
> > 
> > Then I suggest to revert the change to the test and that we look at 
> > fixing the issue instead :)
> 
> I remember Rob mentioning something about utf8 in "unicode and xml
> extensions" @internals.

As far as I know, all XML extensions will accept "string" arguments and
convert them to UTF-8 using something like:

zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s&", &name,
&name_len, UG(utf8_conv)

It is a "bit" more tricky for the properties (widely used in
simplexml).

--Pierre

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

Reply via email to