cvs: php4 /main main.c /sapi/apache mod_php4.c

From: Date: Wed, 08 May 2002 12:33:45 +0000
Subject: cvs: php4 /main main.c /sapi/apache mod_php4.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11754@lists.php.net to get a copy of this message
hirokawa Wed May 8 08:33:45 2002 EDT Modified files: /php4/main main.c /php4/sapi/apache mod_php4.c Log: Added conversion support from script character encoding to internal character encoding. This feature is very useful for japanese who uses Shift_JIS encoding because some of characters in Shift_JIS are including '0x5c' and it causes some troubles on Zend parser. This patch is made by Masaki Fujimoto. Index: php4/main/main.c diff -u php4/main/main.c:1.447 php4/main/main.c:1.448 --- php4/main/main.c:1.447 Wed May 1 21:58:12 2002 +++ php4/main/main.c Wed May 8 08:33:41 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.447 2002/05/02 01:58:12 yohgaki Exp $ */ +/* $Id: main.c,v 1.448 2002/05/08 12:33:41 hirokawa Exp $ */ /* {{{ includes */ @@ -75,6 +75,10 @@ #include "php_logos.h" #include "php_streams.h" +#if defined(ZEND_MULTIBYTE) && defined(HAVE_MBSTRING) +#include "ext/mbstring/mbstring.h" +#endif /* defined(ZEND_MULTIBYTE) && defined(HAVE_MBSTRING) */ + #include "SAPI.h" /* }}} */ @@ -1402,6 +1406,9 @@ } else { append_file_p = NULL; } +#if defined(ZEND_MULTIBYTE) && defined(HAVE_MBSTRING) + php_mbstring_set_zend_encoding(TSRMLS_C); +#endif /* ZEND_MULTIBYTE && HAVE_MBSTRING */ retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) == SUCCESS); } zend_end_try(); Index: php4/sapi/apache/mod_php4.c diff -u php4/sapi/apache/mod_php4.c:1.129 php4/sapi/apache/mod_php4.c:1.130 --- php4/sapi/apache/mod_php4.c:1.129 Mon Apr 22 23:02:20 2002 +++ php4/sapi/apache/mod_php4.c Wed May 8 08:33:44 2002 @@ -17,10 +17,14 @@ | PHP 4.0 patches by Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php4.c,v 1.129 2002/04/23 03:02:20 sniper Exp $ */ +/* $Id: mod_php4.c,v 1.130 2002/05/08 12:33:44 hirokawa Exp $ */ #include "php_apache_http.h" +#if defined(ZEND_MULTIBYTE) && defined(HAVE_MBSTRING) +#include "ext/mbstring/mbstring.h" +#endif /* defined(ZEND_MULTIBYTE) && defined(HAVE_MBSTRING) */ + #undef shutdown /* {{{ Prototypes @@ -459,6 +463,11 @@ fh.opened_path = NULL; fh.free_filename = 0; fh.type = ZEND_HANDLE_FILENAME; + +#if defined(ZEND_MULTIBYTE) && defined(HAVE_MBSTRING) + php_mbstring_set_zend_encoding(TSRMLS_C); +#endif /* defined(ZEND_MULTIBYTE) && defined(HAVE_MBSTRING) */ + zend_execute_scripts(ZEND_INCLUDE TSRMLS_CC, NULL, 1, &fh); return OK; }

« previous php.cvs (#11754) next »