dmitry                                   Wed, 14 Sep 2011 15:00:28 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=316751

Log:
Fixed bug #55552 (bad encoding not detected)

Bug: https://bugs.php.net/55552 (Assigned) bad encoding not detected
      
Changed paths:
    U   php/php-src/branches/PHP_5_4/Zend/zend_multibyte.c
    U   php/php-src/trunk/Zend/zend_multibyte.c

Modified: php/php-src/branches/PHP_5_4/Zend/zend_multibyte.c
===================================================================
--- php/php-src/branches/PHP_5_4/Zend/zend_multibyte.c  2011-09-14 14:57:24 UTC 
(rev 316750)
+++ php/php-src/branches/PHP_5_4/Zend/zend_multibyte.c  2011-09-14 15:00:28 UTC 
(rev 316751)
@@ -32,7 +32,7 @@

 static const char *dummy_encoding_name_getter(const zend_encoding *encoding)
 {
-       return NULL;
+       return (const char*)encoding;
 }

 static int dummy_encoding_lexer_compatibility_checker(const zend_encoding 
*encoding)
@@ -79,11 +79,11 @@
        dummy_internal_encoding_setter
 };

-ZEND_API const zend_encoding *zend_multibyte_encoding_utf32be;
-ZEND_API const zend_encoding *zend_multibyte_encoding_utf32le;
-ZEND_API const zend_encoding *zend_multibyte_encoding_utf16be;
-ZEND_API const zend_encoding *zend_multibyte_encoding_utf16le;
-ZEND_API const zend_encoding *zend_multibyte_encoding_utf8;
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf32be = (const 
zend_encoding*)"UTF-32BE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf32le = (const 
zend_encoding*)"UTF-32LE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf16be = (const 
zend_encoding*)"UTF-16BE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf16le = (const 
zend_encoding*)"UTF-32LE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf8 = (const 
zend_encoding*)"UTF-8";

 ZEND_API int zend_multibyte_set_functions(const zend_multibyte_functions 
*functions TSRMLS_DC)
 {

Modified: php/php-src/trunk/Zend/zend_multibyte.c
===================================================================
--- php/php-src/trunk/Zend/zend_multibyte.c     2011-09-14 14:57:24 UTC (rev 
316750)
+++ php/php-src/trunk/Zend/zend_multibyte.c     2011-09-14 15:00:28 UTC (rev 
316751)
@@ -32,7 +32,7 @@

 static const char *dummy_encoding_name_getter(const zend_encoding *encoding)
 {
-       return NULL;
+       return (const char*)encoding;
 }

 static int dummy_encoding_lexer_compatibility_checker(const zend_encoding 
*encoding)
@@ -79,11 +79,11 @@
        dummy_internal_encoding_setter
 };

-ZEND_API const zend_encoding *zend_multibyte_encoding_utf32be;
-ZEND_API const zend_encoding *zend_multibyte_encoding_utf32le;
-ZEND_API const zend_encoding *zend_multibyte_encoding_utf16be;
-ZEND_API const zend_encoding *zend_multibyte_encoding_utf16le;
-ZEND_API const zend_encoding *zend_multibyte_encoding_utf8;
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf32be = (const 
zend_encoding*)"UTF-32BE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf32le = (const 
zend_encoding*)"UTF-32LE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf16be = (const 
zend_encoding*)"UTF-16BE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf16le = (const 
zend_encoding*)"UTF-32LE";
+ZEND_API const zend_encoding *zend_multibyte_encoding_utf8 = (const 
zend_encoding*)"UTF-8";

 ZEND_API int zend_multibyte_set_functions(const zend_multibyte_functions 
*functions TSRMLS_DC)
 {

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

Reply via email to