]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #27505 (htmlentities() does not handle BIG5 correctly).
authorIlia Alshanetsky <iliaa@php.net>
Sat, 6 Mar 2004 18:35:53 +0000 (18:35 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 6 Mar 2004 18:35:53 +0000 (18:35 +0000)
NEWS
ext/standard/html.c

diff --git a/NEWS b/NEWS
index ccb58a6af837fdd361cbe0ec4e3dad90f68457a4..74078c7e785192c4512339676dd317f8a911ea87 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PHP 4                                                                      NEWS
 ?? 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)
index e0f5f8abc41523e266608fe33cf3284299fc5504..66e408cb91306a34364f411f637a8ac0a3a8b3f5 100644 (file)
@@ -544,10 +544,10 @@ inline static unsigned short get_next_char(enum entity_charset charset,
                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;