mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00
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.
This commit is contained in:
parent
2b5beee5ad
commit
f30b722f14
6 changed files with 295 additions and 4 deletions
|
@ -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 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC)
|
|||
} 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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue