moriyoshi Thu Dec 12 08:25:52 2002 EDT
Modified files:
/php4/ext/standard html.c
Log:
Fixed bug #20934 (htmlspecialchars returns latin1 from UTF-8)
Index: php4/ext/standard/html.c
diff -u php4/ext/standard/html.c:1.65 php4/ext/standard/html.c:1.66
--- php4/ext/standard/html.c:1.65 Sat Nov 16 03:30:31 2002
+++ php4/ext/standard/html.c Thu Dec 12 08:25:51 2002
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: html.c,v 1.65 2002/11/16 08:30:31 sebastian Exp $ */
+/* $Id: html.c,v 1.66 2002/12/12 13:25:51 moriyoshi Exp $ */
#include "php.h"
#if PHP_WIN32
@@ -801,11 +801,10 @@
}
if (!is_basic) {
- if (this_char > 0xff) {
- /* a wide char without a named entity; pass
through the original sequence */
+ /* a wide char without a named entity; pass through
+the original sequence */
+ if (mbseqlen > 1) {
memcpy(replaced + len, mbsequence, mbseqlen);
len += mbseqlen;
-
} else {
replaced[len++] = (unsigned char)this_char;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php