kalle           Tue May 19 16:23:36 2009 UTC

  Modified files:              
    /php-src/ext/xml    xml.c 
  Log:
  Fix unicode support in utf8_decode()
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/xml.c?r1=1.188&r2=1.189&diff_format=u
Index: php-src/ext/xml/xml.c
diff -u php-src/ext/xml/xml.c:1.188 php-src/ext/xml/xml.c:1.189
--- php-src/ext/xml/xml.c:1.188 Thu Mar 26 20:02:53 2009
+++ php-src/ext/xml/xml.c       Tue May 19 16:23:36 2009
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: xml.c,v 1.188 2009/03/26 20:02:53 felipe Exp $ */
+/* $Id: xml.c,v 1.189 2009/05/19 16:23:36 kalle Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -1780,7 +1780,7 @@
 PHP_FUNCTION(utf8_decode)
 {
        XML_Char *decoded;
-       char *data;
+       zstr data;
        int len, data_len;
        zend_uchar data_type;
 
@@ -1789,9 +1789,9 @@
        }
 
        if (data_type == IS_UNICODE) {
-               RETURN_UNICODEL(data, data_len, 1);
+               RETURN_UNICODEL(data.u, data_len, 1);
        }
-       decoded = xml_utf8_decode(data, data_len, &len, NULL);
+       decoded = xml_utf8_decode(data.s, data_len, &len, NULL);
 
        if (decoded == NULL) {
                RETURN_FALSE;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to