iliaa           Sat Mar  6 13:35:54 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/ext/standard       html.c 
  Log:
  MFH: Fixed bug #27505 (htmlentities() does not handle BIG5 correctly).
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.582&r2=1.1247.2.583&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.582 php-src/NEWS:1.1247.2.583
--- php-src/NEWS:1.1247.2.582   Sat Mar  6 13:26:05 2004
+++ php-src/NEWS        Sat Mar  6 13:35:51 2004
@@ -3,6 +3,8 @@
 ?? Feb 2004, Version 4.3.5
 - Fixed possible crashes inside socket extension, due to missing check inside
   allocation functions. (Ilia)
+- Fixed bug #27505 (htmlentities() does not handle BIG5 correctly). (Ilia, 
+  ywliu at hotmail dot com)
 - Fixed bug #27443 (defined() returns wrong type). (Derick)
 - Fixed bug #27437 (wrong freetype include inside GD library). (Ilia)
 - Fixed bug #27384 (unpack() misbehaves with 1 char string). (GeorgeS)
http://cvs.php.net/diff.php/php-src/ext/standard/html.c?r1=1.63.2.16&r2=1.63.2.17&ty=u
Index: php-src/ext/standard/html.c
diff -u php-src/ext/standard/html.c:1.63.2.16 php-src/ext/standard/html.c:1.63.2.17
--- php-src/ext/standard/html.c:1.63.2.16       Thu Oct  2 03:00:55 2003
+++ php-src/ext/standard/html.c Sat Mar  6 13:35:53 2004
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: html.c,v 1.63.2.16 2003/10/02 07:00:55 moriyoshi Exp $ */
+/* $Id: html.c,v 1.63.2.17 2004/03/06 18:35:53 iliaa Exp $ */
 
 /*
  * HTML entity resources:
@@ -544,10 +544,10 @@
                case cs_big5hkscs:
                        {
                                /* check if this is the first of a 2-byte sequence */
-                               if (this_char >= 0xa1 && this_char <= 0xf9) {
+                               if (this_char >= 0xa1 && this_char <= 0xfe) {
                                        /* peek at the next char */
                                        unsigned char next_char = str[pos];
-                                       if ((next_char >= 0x40 && next_char <= 0x73) ||
+                                       if ((next_char >= 0x40 && next_char <= 0x7e) ||
                                                        (next_char >= 0xa1 && 
next_char <= 0xfe)) {
                                                /* yes, this a wide char */
                                                this_char <<= 8;

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

Reply via email to