diff options
Diffstat (limited to 'ext/mbstring')
31 files changed, 364 insertions, 535 deletions
diff --git a/ext/mbstring/README_PHP3-i18n-ja b/ext/mbstring/README_PHP3-i18n-ja index 869fe3e495..eabe9e90f2 100644 --- a/ext/mbstring/README_PHP3-i18n-ja +++ b/ext/mbstring/README_PHP3-i18n-ja @@ -371,7 +371,7 @@ o i18n.internal_encoding - internal encoding encodings, following conditions have to be satisfied in order to use them: - per byte encoding - - single byte charactor in range of 00h-7fh which is compatible + - single byte character in range of 00h-7fh which is compatible with ASCII - multibyte without 00h-7fh In case of Japanese, EUC-JP and UTF-8 are the only encoding that @@ -408,7 +408,7 @@ o i18n.script_encoding - script encoding entering the script parser. Be aware that auto detection may fail under some conditions. - For best auto detection, add multibyte charactor at beginning of + For best auto detection, add multibyte character at beginning of script. diff --git a/ext/mbstring/libmbfl/cvsclean b/ext/mbstring/libmbfl/cvsclean deleted file mode 100755 index 60ae246a50..0000000000 --- a/ext/mbstring/libmbfl/cvsclean +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -function cvsclean_sub() { - prev_pwd=`pwd` - cd $1 - cat .cvsignore | while read fname; do - rm -r -f $fname - done - cd "$prev_pwd" -} - -cvsclean_sub . -cvsclean_sub mbfl -cvsclean_sub filters -cvsclean_sub nls diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c index 8d733a9d19..3db085dff4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c @@ -278,7 +278,7 @@ retry: w = cp932ext1_ucs_table[s - cp932ext1_ucs_table_min]; } else if (s >= cp932ext2_ucs_table_min && s < cp932ext2_ucs_table_max) { w = cp932ext2_ucs_table[s - cp932ext2_ucs_table_min]; - } else if (s >= cp932ext3_ucs_table_min && s < cp932ext2_ucs_table_max) { + } else if (s >= cp932ext3_ucs_table_min && s < cp932ext3_ucs_table_max) { w = cp932ext3_ucs_table[s - cp932ext3_ucs_table_min]; } else if (s >= 94 * 94 && s < 114 * 94) { /* user-defined => PUA (Microsoft extended) */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c index 87bb2f21fd..911d902052 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c @@ -672,6 +672,8 @@ retry: CK(mbfl_filt_conv_illegal_output(c, filter)); } } + + return c; } int diff --git a/ext/mbstring/libmbfl/filters/unicode_prop.h b/ext/mbstring/libmbfl/filters/unicode_prop.h index d21ec61dfb..4feb5756e3 100644 --- a/ext/mbstring/libmbfl/filters/unicode_prop.h +++ b/ext/mbstring/libmbfl/filters/unicode_prop.h @@ -22,7 +22,7 @@ * */ -/* charactor property table */ +/* character property table */ #define MBFL_CHP_CTL 0x01 #define MBFL_CHP_DIGIT 0x02 #define MBFL_CHP_UALPHA 0x04 diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h index 6a630c8fcd..b11119a80b 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_consts.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_consts.h @@ -45,7 +45,7 @@ #define MBFL_ENCTYPE_ENC_STRM 0x00002000 #define MBFL_ENCTYPE_GL_UNSAFE 0x00004000 -/* wchar plane, special charactor */ +/* wchar plane, special character */ #define MBFL_WCSPLANE_MASK 0xffff #define MBFL_WCSPLANE_UCS2MAX 0x00010000 #define MBFL_WCSPLANE_UTF32MAX 0x00110000 diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c index 16fbf5d07c..afa90376ab 100644 --- a/ext/mbstring/mb_gpc.c +++ b/ext/mbstring/mb_gpc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -364,6 +364,7 @@ SAPI_POST_HANDLER_FUNC(php_mb_post_handler) { const mbfl_encoding *detected; php_mb_encoding_handler_info_t info; + char *post_data_str = NULL; MBSTRG(http_input_identify_post) = NULL; @@ -376,7 +377,10 @@ SAPI_POST_HANDLER_FUNC(php_mb_post_handler) info.num_from_encodings = MBSTRG(http_input_list_size); info.from_language = MBSTRG(language); - detected = _php_mb_encoding_handler_ex(&info, arg, SG(request_info).post_data TSRMLS_CC); + php_stream_rewind(SG(request_info).request_body); + php_stream_copy_to_mem(SG(request_info).request_body, &post_data_str, PHP_STREAM_COPY_ALL, 0); + detected = _php_mb_encoding_handler_ex(&info, arg, post_data_str TSRMLS_CC); + STR_FREE(post_data_str); MBSTRG(http_input_identify) = detected; if (detected) { diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index aab40ec629..1cfaf2cc36 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -402,10 +402,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_convert_kana, 0, 0, 1) ZEND_ARG_INFO(0, encoding) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_convert_variables, 1, 0, 3) +ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_convert_variables, 0, 0, 3) ZEND_ARG_INFO(0, to) ZEND_ARG_INFO(0, from) - ZEND_ARG_INFO(1, ...) + ZEND_ARG_VARIADIC_INFO(1, vars) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_encode_numericentity, 0, 0, 2) @@ -601,6 +601,34 @@ static sapi_post_entry php_post_entries[] = { ZEND_GET_MODULE(mbstring) #endif +static char *get_internal_encoding(TSRMLS_D) { + if (PG(internal_encoding) && PG(internal_encoding)[0]) { + return PG(internal_encoding); + } else if (SG(default_charset)) { + return SG(default_charset); + } + return ""; +} + +static char *get_input_encoding(TSRMLS_D) { + if (PG(input_encoding) && PG(input_encoding)[0]) { + return PG(input_encoding); + } else if (SG(default_charset)) { + return SG(default_charset); + } + return ""; +} + +static char *get_output_encoding(TSRMLS_D) { + if (PG(output_encoding) && PG(output_encoding)[0]) { + return PG(output_encoding); + } else if (SG(default_charset)) { + return SG(default_charset); + } + return ""; +} + + /* {{{ allocators */ static void *_php_mb_allocators_malloc(unsigned int sz) { @@ -1236,6 +1264,11 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input) if (MBSTRG(http_input_list)) { pefree(MBSTRG(http_input_list), 1); } + if (SUCCESS == php_mb_parse_encoding_list(get_input_encoding(TSRMLS_C), strlen(get_input_encoding(TSRMLS_C))+1, &list, &size, 1 TSRMLS_CC)) { + MBSTRG(http_input_list) = list; + MBSTRG(http_input_list_size) = size; + return SUCCESS; + } MBSTRG(http_input_list) = NULL; MBSTRG(http_input_list_size) = 0; return SUCCESS; @@ -1251,6 +1284,10 @@ static PHP_INI_MH(OnUpdate_mbstring_http_input) MBSTRG(http_input_list) = list; MBSTRG(http_input_list_size) = size; + if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) { + php_error_docref("ref.mbstring" TSRMLS_CC, E_DEPRECATED, "Use of mbstring.http_input is deprecated"); + } + return SUCCESS; } /* }}} */ @@ -1261,20 +1298,27 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output) const mbfl_encoding *encoding; if (new_value == NULL || new_value_length == 0) { - MBSTRG(http_output_encoding) = &mbfl_encoding_pass; - MBSTRG(current_http_output_encoding) = &mbfl_encoding_pass; - return SUCCESS; + encoding = mbfl_name2encoding(get_output_encoding(TSRMLS_C)); + if (!encoding) { + MBSTRG(http_output_encoding) = &mbfl_encoding_pass; + MBSTRG(current_http_output_encoding) = &mbfl_encoding_pass; + return SUCCESS; + } + } else { + encoding = mbfl_name2encoding(new_value); + if (!encoding) { + MBSTRG(http_output_encoding) = &mbfl_encoding_pass; + MBSTRG(current_http_output_encoding) = &mbfl_encoding_pass; + return FAILURE; + } } + MBSTRG(http_output_encoding) = encoding; + MBSTRG(current_http_output_encoding) = encoding; - encoding = mbfl_name2encoding(new_value); - if (!encoding) { - MBSTRG(http_output_encoding) = &mbfl_encoding_pass; - MBSTRG(current_http_output_encoding) = &mbfl_encoding_pass; - return FAILURE; + if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) { + php_error_docref("ref.mbstring" TSRMLS_CC, E_DEPRECATED, "Use of mbstring.http_output is deprecated"); } - MBSTRG(http_output_encoding) = encoding; - MBSTRG(current_http_output_encoding) = encoding; return SUCCESS; } /* }}} */ @@ -1285,47 +1329,17 @@ int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_v const mbfl_encoding *encoding; if (!new_value || new_value_length == 0 || !(encoding = mbfl_name2encoding(new_value))) { - switch (MBSTRG(language)) { - case mbfl_no_language_uni: - encoding = mbfl_no2encoding(mbfl_no_encoding_utf8); - break; - case mbfl_no_language_japanese: - encoding = mbfl_no2encoding(mbfl_no_encoding_euc_jp); - break; - case mbfl_no_language_korean: - encoding = mbfl_no2encoding(mbfl_no_encoding_euc_kr); - break; - case mbfl_no_language_simplified_chinese: - encoding = mbfl_no2encoding(mbfl_no_encoding_euc_cn); - break; - case mbfl_no_language_traditional_chinese: - encoding = mbfl_no2encoding(mbfl_no_encoding_euc_tw); - break; - case mbfl_no_language_russian: - encoding = mbfl_no2encoding(mbfl_no_encoding_koi8r); - break; - case mbfl_no_language_german: - encoding = mbfl_no2encoding(mbfl_no_encoding_8859_15); - break; - case mbfl_no_language_armenian: - encoding = mbfl_no2encoding(mbfl_no_encoding_armscii8); - break; - case mbfl_no_language_turkish: - encoding = mbfl_no2encoding(mbfl_no_encoding_8859_9); - break; - default: - encoding = mbfl_no2encoding(mbfl_no_encoding_8859_1); - break; - } - } + /* falls back to UTF-8 if an unknown encoding name is given */ + encoding = mbfl_no2encoding(mbfl_no_encoding_utf8); + } MBSTRG(internal_encoding) = encoding; MBSTRG(current_internal_encoding) = encoding; #if HAVE_MBREGEX { const char *enc_name = new_value; if (FAILURE == php_mb_regex_set_default_mbctype(enc_name TSRMLS_CC)) { - /* falls back to EUC-JP if an unknown encoding name is given */ - enc_name = "EUC-JP"; + /* falls back to UTF-8 if an unknown encoding name is given */ + enc_name = "UTF-8"; php_mb_regex_set_default_mbctype(enc_name TSRMLS_CC); } php_mb_regex_set_mbctype(new_value TSRMLS_CC); @@ -1338,12 +1352,20 @@ int _php_mb_ini_mbstring_internal_encoding_set(const char *new_value, uint new_v /* {{{ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding) */ static PHP_INI_MH(OnUpdate_mbstring_internal_encoding) { + if (stage & (PHP_INI_STAGE_ACTIVATE | PHP_INI_STAGE_RUNTIME)) { + php_error_docref("ref.mbstring" TSRMLS_CC, E_DEPRECATED, "Use of mbstring.internal_encoding is deprecated"); + } + if (OnUpdateString(entry, new_value, new_value_length, mh_arg1, mh_arg2, mh_arg3, stage TSRMLS_CC) == FAILURE) { return FAILURE; } - if (stage == PHP_INI_STAGE_STARTUP || stage == PHP_INI_STAGE_SHUTDOWN - || stage == PHP_INI_STAGE_RUNTIME) { - return _php_mb_ini_mbstring_internal_encoding_set(new_value, new_value_length TSRMLS_CC); + + if (stage & (PHP_INI_STAGE_STARTUP | PHP_INI_STAGE_SHUTDOWN | PHP_INI_STAGE_RUNTIME)) { + if (new_value_length) { + return _php_mb_ini_mbstring_internal_encoding_set(new_value, new_value_length TSRMLS_CC); + } else { + return _php_mb_ini_mbstring_internal_encoding_set(get_internal_encoding(TSRMLS_C), strlen(get_internal_encoding(TSRMLS_C))+1 TSRMLS_CC); + } } else { /* the corresponding mbstring globals needs to be set according to the * ini value in the later stage because it never falls back to the @@ -1450,8 +1472,8 @@ static PHP_INI_MH(OnUpdate_mbstring_http_output_conv_mimetypes) PHP_INI_BEGIN() PHP_INI_ENTRY("mbstring.language", "neutral", PHP_INI_ALL, OnUpdate_mbstring_language) PHP_INI_ENTRY("mbstring.detect_order", NULL, PHP_INI_ALL, OnUpdate_mbstring_detect_order) - PHP_INI_ENTRY("mbstring.http_input", "pass", PHP_INI_ALL, OnUpdate_mbstring_http_input) - PHP_INI_ENTRY("mbstring.http_output", "pass", PHP_INI_ALL, OnUpdate_mbstring_http_output) + PHP_INI_ENTRY("mbstring.http_input", NULL, PHP_INI_ALL, OnUpdate_mbstring_http_input) + PHP_INI_ENTRY("mbstring.http_output", NULL, PHP_INI_ALL, OnUpdate_mbstring_http_output) STD_PHP_INI_ENTRY("mbstring.internal_encoding", NULL, PHP_INI_ALL, OnUpdate_mbstring_internal_encoding, internal_encoding_name, zend_mbstring_globals, mbstring_globals) PHP_INI_ENTRY("mbstring.substitute_character", NULL, PHP_INI_ALL, OnUpdate_mbstring_substitute_character) STD_PHP_INI_ENTRY("mbstring.func_overload", "0", @@ -2162,8 +2184,10 @@ PHP_FUNCTION(mb_output_handler) /* feed the string */ mbfl_string_init(&string); - string.no_language = MBSTRG(language); - string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; + /* these are not needed. convd has encoding info. + string.no_language = MBSTRG(language); + string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; + */ string.val = (unsigned char *)arg_string; string.len = arg_string_len; mbfl_buffer_converter_feed(MBSTRG(outconv), &string); diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index 2ecef59458..f7e618d3ec 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mbstring/oniguruma/HISTORY b/ext/mbstring/oniguruma/HISTORY index 7add6f9a90..6b3031bcb6 100644 --- a/ext/mbstring/oniguruma/HISTORY +++ b/ext/mbstring/oniguruma/HISTORY @@ -1,5 +1,24 @@ History +2013/10/21: Version 5.9.5 + +2013/10/21: [impl] escape warnings for -Wall. (regparse.c) +2013/10/21: [bug] fixes an issue on Windows x64. (thanks Anatoliy Belsky) + The issue was discovered in PHP, see https://bugs.php.net/64769. +2013/10/21: [impl] remove unused variable. (regcomp.c) + +2013/04/04: Version 5.9.4 + +2013/04/04: [dev] remove Makefile.in from git repository. +2013/04/04: [dist] add oniguruma.pc.in file. (for pkg-config) + (thanks Giulio Paci) + +2012/10/26: Version 5.9.3 + +2012/10/15: remove warnings "test: =: unary operator expected" in ./configure. + (thanks t_okazaki) +2012/10/15: fix print_tree ENCLOSE_OPTION bug. (thanks Suraj N. Kurapati) + 2010/01/09: Version 5.9.2 2010/01/05: [bug] fix utf16be_code_to_mbc() and utf16le_code_to_mbc(). @@ -878,7 +897,7 @@ History 2004/10/18: [impl] (thanks Imai Yasumasa) enclose #include <sys/types.h> by #ifndef __BORLANDC__. 2004/10/18: [bug] (thanks Imai Yasumasa) - memory access violation in select_opt_exact_info(). + memory acess violation in select_opt_exact_info(). 2004/09/25: [dist] fix doc/API and doc/API.ja. 2004/09/25: [bug] fix OP_SEMI_END_BUF process in match_at() for the case USE_NEWLINE_AT_END_OF_STRING_HAS_EMPTY_LINE @@ -1812,7 +1831,7 @@ History 2003/01/31: [impl] rename TTRANS() to TOLOWER(). 2003/01/30: [bug] .c.o --> .c.obj in win32\Makefile. 2003/01/30: [impl] add -DNOT_RUBY to Makefile.in. - NOT_RUBY is referred in regint.h for escape double + NOT_RUBY is refered in regint.h for escape double including config.h. 2003/01/30: [impl] when string hasn't case ambiguity, don't compile to ignore case opcode. diff --git a/ext/mbstring/oniguruma/config.h.in b/ext/mbstring/oniguruma/config.h.in index 4a2fc28d82..cd61683314 100644 --- a/ext/mbstring/oniguruma/config.h.in +++ b/ext/mbstring/oniguruma/config.h.in @@ -57,6 +57,10 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Name of package */ #undef PACKAGE @@ -72,21 +76,24 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* The size of a `int', as computed by sizeof. */ +/* The size of `int', as computed by sizeof. */ #undef SIZEOF_INT -/* The size of a `long', as computed by sizeof. */ +/* The size of `long', as computed by sizeof. */ #undef SIZEOF_LONG -/* The size of a `short', as computed by sizeof. */ +/* The size of `short', as computed by sizeof. */ #undef SIZEOF_SHORT /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. + automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ @@ -101,8 +108,14 @@ /* Define if combination explosion check */ #undef USE_COMBINATION_EXPLOSION_CHECK +/* Define if enable CR+NL as line terminator */ +#undef USE_CRNL_AS_LINE_TERMINATOR + /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const + +/* Define to `unsigned int' if <sys/types.h> does not define. */ +#undef size_t diff --git a/ext/mbstring/oniguruma/index.html b/ext/mbstring/oniguruma/index.html index af3426ce32..9231942b16 100755 --- a/ext/mbstring/oniguruma/index.html +++ b/ext/mbstring/oniguruma/index.html @@ -8,7 +8,7 @@ <h1>Oniguruma</h1> (<a href="index_ja.html">Japanese</a>) <p> -(c) K.Kosako, updated at: 2010/01/09 +(c) K.Kosako, updated at: 2013/10/21 </p> <dl> @@ -16,7 +16,7 @@ <dt><b>What's new</b> </font> <ul> -<li>2010/01/09: Version 5.9.2 released.</li> +<li>2013/10/21: Version 5.9.5 released.</li> <li>2007/08/16: Version 4.7.1 released.</li> <li>2007/06/20: Version 2.5.9 released.</li> <li>2007/06/20: Maintainer of 2.x was changed.</li> @@ -62,8 +62,8 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br> <dt><b>Download:</b> <ul> -<li> <a href="archive/onig-5.9.2.tar.gz">Latest release version 5.9.2</a> (2010/01/09) <a href="HISTORY_5X.txt">Change Log</a> -<li> <a href="archive/onig-5.9.1.tar.gz">5.9.1</a> (2007/12/22) +<li> <a href="archive/onig-5.9.5.tar.gz">Latest release version 5.9.5</a> (2013/10/21) <a href="HISTORY_5X.txt">Change Log</a> +<li> <a href="archive/onig-5.9.4.tar.gz">5.9.4</a> (2013/04/04) <li> <a href="archive/onig-4.7.1.tar.gz">Latest release version 4.7.1</a> (2007/08/16) <a href="HISTORY_4X.txt">Change Log</a> <li> <a href="archive/onig-4.7.0.tar.gz">4.7.0</a> (2007/06/18) <li> <a href="archive/onigd2_5_9.tar.gz">Latest release version 2.5.9</a> (2007/06/20) <a href="HISTORY_2X.txt">Change Log</a> @@ -78,7 +78,7 @@ About 2.x, please contact him.<br> * 2.x supports Ruby1.6/1.8.<br> <br> -<dt><b>Documents:</b> (version 5.9.2) +<dt><b>Documents:</b> (version 5.9.5) <ul> <li> <a href="doc/RE.txt">Regular Expressions</a> <a href="doc/RE.ja.txt">(Japanese: EUC-JP)</a> @@ -103,8 +103,11 @@ About 2.x, please contact him.<br> <br> <dt><b>Links:</b> <ul> +<li> <a href="http://www.perzl.org/aix/index.php?n=Main.Oniguruma">AIX Open Source Packages</a> +<li> <a href="https://aur.archlinux.org/packages/oniguruma/">Arch Linux Package</a> <li> <a href="http://homepage3.nifty.com/k-takata/mysoft/bregonig.html">bregonig.dll (Win32)</a> (Japanese page) <li> <a href="http://www.halbiz.com/osaru/cnregex.html">cnRegex 4D Plugin (Mac OS X)</a> (Japanese page) +<li> <a href="http://limechat.net/cocoaoniguruma/">CocoaOniguruma</a> <li> <a href="http://kmaebashi.com/">crowbar</a> (Japanese page) <li> <a href="http://oniguruma5.darwinports.com">Darwin Ports (Mac OS X)</a> <li> <a href="http://homepage2.nifty.com/Km/onig.htm">Delphi interface (Win32)</a> (Japanese page) @@ -121,7 +124,7 @@ About 2.x, please contact him.<br> <li> <a href="http://mongoose.jp/">mongoose</a> (Japanese page) <li> <a href="http://www.irori.org/tool/mregexp.html">mregexp</a> (Japanese page) <li> <a href="http://ochusha.sourceforge.jp/">Ochusha</a> (Japanese page) -<li> <a href="http://www8.ocn.ne.jp/%7esonoisa/OgreKit/index.html">OgreKit (Mac OS X)</a> Regular Expression Framework for Cocoa (Japanese page) +<li> <a href="http://sonoisa.github.com/ogrekit/About_%28English%29.html">OgreKit (Mac OS X)</a> Regular Expression Framework for Cocoa (Japanese page) <li> <a href="http://www.kanetaka.net/4dapi/wiki4d.dll/4dcgi/wiki.cgi?plugins-oniguruma">OnigRegexp</a> (Japanese page) <li> <a href="http://rubyforge.org/projects/oniguruma">Oniguruma for Ruby</a> <li> <a href="http://openspace.timedia.co.jp/~yasuyuki/wiliki/wiliki.cgi?Oniguruma-mysqld&l=jp">Oniguruma-mysqld</a> @@ -140,6 +143,7 @@ About 2.x, please contact him.<br> <li> <a href="http://sourceforge.jp/projects/ttssh2/">TeraTerm (Win32)</a> <li> <a href="http://www8.ocn.ne.jp/~sonoisa/TiddlyWikiPod/">TiddlyWikiPod (Mac OS X)</a> <li> <a href="http://www.cyanworks.net/mac.html">TunesTEXT (Mac OS X)</a> +<li> <a href="https://code.google.com/p/oniguruma-visualworks/">oniguruma-visualworks</a> <li> <a href="http://sourceforge.jp/projects/frogger/">XML parser</a> <li> <a href="http://www.yokkasoft.net/">YokkaSoft (Win32)</a> (Japanese page) <li> <a href="http://www.hi-ho.ne.jp/kuze/tool.htm">Zed (Win32)</a> (Japanese page) diff --git a/ext/mbstring/oniguruma/index_ja.html b/ext/mbstring/oniguruma/index_ja.html index e03b045b98..4826cbc2e2 100644 --- a/ext/mbstring/oniguruma/index_ja.html +++ b/ext/mbstring/oniguruma/index_ja.html @@ -8,7 +8,7 @@ <h1>鬼車</h1> <p> -(c) K.Kosako, 最終更新: 2010/01/09 +(c) K.Kosako, 最終更新: 2013/04/04 </p> <dl> @@ -16,7 +16,7 @@ <dt><b>更新情報</b> </font> <ul> -<li>2010/01/09: Version 5.9.2 リリース</li> +<li>2013/10/21: Version 5.9.5 リリース</li> <li>2007/08/16: Version 4.7.1 リリース</li> <li>2007/06/20: Version 2.5.9 リリース</li> <li>2007/06/20: 2.xの保守担当者を変更</li> @@ -62,8 +62,8 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br> <dt><b>ダウンロード:</b> <ul> -<li> <a href="archive/onig-5.9.2.tar.gz">5.9.2 最新版</a> (2010/01/09) <a href="HISTORY_5X.txt">更新履歴</a> -<li> <a href="archive/onig-5.9.1.tar.gz">5.9.1</a> (2007/12/22) +<li> <a href="archive/onig-5.9.5.tar.gz">5.9.5 最新版</a> (2013/10/21) <a href="HISTORY_5X.txt">更新履歴</a> +<li> <a href="archive/onig-5.9.4.tar.gz">5.9.4</a> (2013/04/04) <li> <a href="archive/onig-4.7.1.tar.gz">4.7.1 最新版</a> (2007/08/16) <a href="HISTORY_4X.txt">更新履歴</a> <li> <a href="archive/onig-4.7.0.tar.gz">4.7.0</a> (2007/06/18) <li> <a href="archive/onigd2_5_9.tar.gz">2.5.9 最新版</a> (2007/06/20) <a href="HISTORY_2X.txt">更新履歴</a> @@ -78,7 +78,7 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br> * 2.xはRuby1.6/1.8組込みライブラリとして動作する。 (2006年末で保守を終了)<br> <br> -<dt><b>ドキュメント:</b> (version 5.9.2) +<dt><b>ドキュメント:</b> (version 5.9.5) <ul> <li> <a href="doc/RE.txt">正規表現</a> <a href="doc/RE.ja.txt">(日本語: EUC-JP)</a> @@ -103,8 +103,11 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br> <br> <dt><b>リンク:</b> <ul> +<li> <a href="http://www.perzl.org/aix/index.php?n=Main.Oniguruma">AIX Open Source Packages</a> +<li> <a href="https://aur.archlinux.org/packages/oniguruma/">Arch Linux Package</a> <li> <a href="http://homepage3.nifty.com/k-takata/mysoft/bregonig.html">bregonig.dll (Win32)</a> (日本語) <li> <a href="http://www.halbiz.com/osaru/cnregex.html">cnRegex 4D Plugin (Mac OS X)</a> (日本語) +<li> <a href="http://limechat.net/cocoaoniguruma/index_ja.html">CocoaOniguruma</a> (日本語) <li> <a href="http://kmaebashi.com/">crowbar</a> (日本語) <li> <a href="http://oniguruma5.darwinports.com">Darwin Ports (Mac OS X)</a> <li> <a href="http://homepage2.nifty.com/Km/onig.htm">Delphi interface (Win32)</a> (日本語) @@ -121,7 +124,7 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br> <li> <a href="http://mongoose.jp/">mongoose</a> (日本語) <li> <a href="http://www.irori.org/tool/mregexp.html">mregexp</a> (日本語) <li> <a href="http://ochusha.sourceforge.jp/">おちゅ〜しゃ</a> (日本語) -<li> <a href="http://www8.ocn.ne.jp/%7esonoisa/OgreKit/index.html">OgreKit (Mac OS X)</a> Regular Expression Framework for Cocoa (日本語) +<li> <a href="http://sonoisa.github.com/ogrekit/About.html">OgreKit (Mac OS X)</a> Regular Expression Framework for Cocoa (日本語) <li> <a href="http://www.kanetaka.net/4dapi/wiki4d.dll/4dcgi/wiki.cgi?plugins-oniguruma">OnigRegexp</a> (日本語) <li> <a href="http://rubyforge.org/projects/oniguruma">Oniguruma for Ruby</a> <li> <a href="http://openspace.timedia.co.jp/~yasuyuki/wiliki/wiliki.cgi?Oniguruma-mysqld&l=jp">Oniguruma-mysqld</a> @@ -140,6 +143,7 @@ ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16<br> <li> <a href="http://sourceforge.jp/projects/ttssh2/">TeraTerm (Win32)</a> <li> <a href="http://www8.ocn.ne.jp/~sonoisa/TiddlyWikiPod/">TiddlyWikiPod (Mac OS X)</a> <li> <a href="http://www.cyanworks.net/mac.html">TunesTEXT (Mac OS X)</a> +<li> <a href="https://code.google.com/p/oniguruma-visualworks/">oniguruma-visualworks</a> <li> <a href="http://sourceforge.jp/projects/frogger/">XML parser</a> <li> <a href="http://www.yokkasoft.net/">YokkaSoft (Win32)</a> (日本語) <li> <a href="http://www.hi-ho.ne.jp/kuze/tool.htm">Zed (Win32)</a> (日本語) diff --git a/ext/mbstring/oniguruma/onigcmpt200.h b/ext/mbstring/oniguruma/onigcmpt200.h deleted file mode 100644 index d9b1419146..0000000000 --- a/ext/mbstring/oniguruma/onigcmpt200.h +++ /dev/null @@ -1,310 +0,0 @@ -/********************************************************************** - - onigcmpt200.h - Oniguruma (regular expression library) - - Copyright (C) 2004 K.Kosako (kosako@sofnec.co.jp) - -**********************************************************************/ -#ifndef ONIGCMPT200_H -#define ONIGCMPT200_H - -/* constants */ -#define REG_MAX_ERROR_MESSAGE_LEN ONIG_MAX_ERROR_MESSAGE_LEN - -#define RegCharEncoding OnigEncoding - -#define REG_ENCODING_ASCII ONIG_ENCODING_ASCII -#define REG_ENCODING_ISO_8859_1 ONIG_ENCODING_ISO_8859_1 -#define REG_ENCODING_ISO_8859_15 ONIG_ENCODING_ISO_8859_15 -#define REG_ENCODING_UTF8 ONIG_ENCODING_UTF8 -#define REG_ENCODING_EUC_JP ONIG_ENCODING_EUC_JP -#define REG_ENCODING_SJIS ONIG_ENCODING_SJIS -#define REG_ENCODING_BIG5 ONIG_ENCODING_BIG5 -#define REG_ENCODING_UNDEF ONIG_ENCODING_UNDEF - -/* Don't use REGCODE_XXXX. (obsoleted) */ -#define REGCODE_UNDEF REG_ENCODING_UNDEF -#define REGCODE_ASCII REG_ENCODING_ASCII -#define REGCODE_UTF8 REG_ENCODING_UTF8 -#define REGCODE_EUCJP REG_ENCODING_EUC_JP -#define REGCODE_SJIS REG_ENCODING_SJIS - -/* Don't use REGCODE_XXXX. (obsoleted) */ -#define MBCTYPE_ASCII RE_MBCTYPE_ASCII -#define MBCTYPE_EUC RE_MBCTYPE_EUC -#define MBCTYPE_SJIS RE_MBCTYPE_SJIS -#define MBCTYPE_UTF8 RE_MBCTYPE_UTF8 - -typedef unsigned char* RegTransTableType; -#define RegOptionType OnigOptionType -#define RegDistance OnigDistance - -#define REG_OPTION_DEFAULT ONIG_OPTION_DEFAULT - -/* options */ -#define REG_OPTION_NONE ONIG_OPTION_NONE -#define REG_OPTION_SINGLELINE ONIG_OPTION_SINGLELINE -#define REG_OPTION_MULTILINE ONIG_OPTION_MULTILINE -#define REG_OPTION_IGNORECASE ONIG_OPTION_IGNORECASE -#define REG_OPTION_EXTEND ONIG_OPTION_EXTEND -#define REG_OPTION_FIND_LONGEST ONIG_OPTION_FIND_LONGEST -#define REG_OPTION_FIND_NOT_EMPTY ONIG_OPTION_FIND_NOT_EMPTY -#define REG_OPTION_NEGATE_SINGLELINE ONIG_OPTION_NEGATE_SINGLELINE -#define REG_OPTION_DONT_CAPTURE_GROUP ONIG_OPTION_DONT_CAPTURE_GROUP -#define REG_OPTION_CAPTURE_GROUP ONIG_OPTION_CAPTURE_GROUP -#define REG_OPTION_NOTBOL ONIG_OPTION_NOTBOL -#define REG_OPTION_NOTEOL ONIG_OPTION_NOTEOL -#define REG_OPTION_POSIX_REGION ONIG_OPTION_POSIX_REGION - -#define REG_OPTION_ON ONIG_OPTION_ON -#define REG_OPTION_OFF ONIG_OPTION_OFF -#define IS_REG_OPTION_ON ONIG_IS_OPTION_ON - -/* syntax */ -#define RegSyntaxType OnigSyntaxType - -#define RegSyntaxPosixBasic OnigSyntaxPosixBasic -#define RegSyntaxPosixExtended OnigSyntaxPosixExtended -#define RegSyntaxEmacs OnigSyntaxEmacs -#define RegSyntaxGrep OnigSyntaxGrep -#define RegSyntaxGnuRegex OnigSyntaxGnuRegex -#define RegSyntaxJava OnigSyntaxJava -#define RegSyntaxPerl OnigSyntaxPerl -#define RegSyntaxRuby OnigSyntaxRuby - -#define REG_SYNTAX_POSIX_BASIC ONIG_SYNTAX_POSIX_BASIC -#define REG_SYNTAX_POSIX_EXTENDED ONIG_SYNTAX_POSIX_EXTENDED -#define REG_SYNTAX_EMACS ONIG_SYNTAX_EMACS -#define REG_SYNTAX_GREP ONIG_SYNTAX_GREP -#define REG_SYNTAX_GNU_REGEX ONIG_SYNTAX_GNU_REGEX -#define REG_SYNTAX_JAVA ONIG_SYNTAX_JAVA -#define REG_SYNTAX_PERL ONIG_SYNTAX_PERL -#define REG_SYNTAX_RUBY ONIG_SYNTAX_RUBY - -#define REG_SYNTAX_DEFAULT ONIG_SYNTAX_DEFAULT -#define RegDefaultSyntax OnigDefaultSyntax - -/* syntax (operators) */ -#define REG_SYN_OP_VARIABLE_META_CHARACTERS \ - ONIG_SYN_OP_VARIABLE_META_CHARACTERS -#define REG_SYN_OP_DOT_ANYCHAR \ - ONIG_SYN_OP_DOT_ANYCHAR -#define REG_SYN_OP_ASTERISK_ZERO_INF \ - ONIG_SYN_OP_ASTERISK_ZERO_INF -#define REG_SYN_OP_ESC_ASTERISK_ZERO_INF \ - ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF -#define REG_SYN_OP_PLUS_ONE_INF \ - ONIG_SYN_OP_PLUS_ONE_INF -#define REG_SYN_OP_ESC_PLUS_ONE_INF \ - ONIG_SYN_OP_ESC_PLUS_ONE_INF -#define REG_SYN_OP_QMARK_ZERO_ONE \ - ONIG_SYN_OP_QMARK_ZERO_ONE -#define REG_SYN_OP_ESC_QMARK_ZERO_ONE \ - ONIG_SYN_OP_ESC_QMARK_ZERO_ONE -#define REG_SYN_OP_BRACE_INTERVAL \ - ONIG_SYN_OP_BRACE_INTERVAL -#define REG_SYN_OP_ESC_BRACE_INTERVAL \ - ONIG_SYN_OP_ESC_BRACE_INTERVAL -#define REG_SYN_OP_VBAR_ALT \ - ONIG_SYN_OP_VBAR_ALT -#define REG_SYN_OP_ESC_VBAR_ALT \ - ONIG_SYN_OP_ESC_VBAR_ALT -#define REG_SYN_OP_LPAREN_SUBEXP \ - ONIG_SYN_OP_LPAREN_SUBEXP -#define REG_SYN_OP_ESC_LPAREN_SUBEXP \ - ONIG_SYN_OP_ESC_LPAREN_SUBEXP -#define REG_SYN_OP_ESC_AZ_BUF_ANCHOR \ - ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR -#define REG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR \ - ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR -#define REG_SYN_OP_DECIMAL_BACKREF \ - ONIG_SYN_OP_DECIMAL_BACKREF -#define REG_SYN_OP_BRACKET_CC \ - ONIG_SYN_OP_BRACKET_CC -#define REG_SYN_OP_ESC_W_WORD \ - ONIG_SYN_OP_ESC_W_WORD -#define REG_SYN_OP_ESC_LTGT_WORD_BEGIN_END \ - ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END -#define REG_SYN_OP_ESC_B_WORD_BOUND \ - ONIG_SYN_OP_ESC_B_WORD_BOUND -#define REG_SYN_OP_ESC_S_WHITE_SPACE \ - ONIG_SYN_OP_ESC_S_WHITE_SPACE -#define REG_SYN_OP_ESC_D_DIGIT \ - ONIG_SYN_OP_ESC_D_DIGIT -#define REG_SYN_OP_LINE_ANCHOR \ - ONIG_SYN_OP_LINE_ANCHOR -#define REG_SYN_OP_POSIX_BRACKET \ - ONIG_SYN_OP_POSIX_BRACKET -#define REG_SYN_OP_QMARK_NON_GREEDY \ - ONIG_SYN_OP_QMARK_NON_GREEDY -#define REG_SYN_OP_ESC_CONTROL_CHARS \ - ONIG_SYN_OP_ESC_CONTROL_CHARS -#define REG_SYN_OP_ESC_C_CONTROL \ - ONIG_SYN_OP_ESC_C_CONTROL -#define REG_SYN_OP_ESC_OCTAL3 \ - ONIG_SYN_OP_ESC_OCTAL3 -#define REG_SYN_OP_ESC_X_HEX2 \ - ONIG_SYN_OP_ESC_X_HEX2 -#define REG_SYN_OP_ESC_X_BRACE_HEX8 \ - ONIG_SYN_OP_ESC_X_BRACE_HEX8 - -#define REG_SYN_OP2_ESC_CAPITAL_Q_QUOTE \ - ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE -#define REG_SYN_OP2_QMARK_GROUP_EFFECT \ - ONIG_SYN_OP2_QMARK_GROUP_EFFECT -#define REG_SYN_OP2_OPTION_PERL \ - ONIG_SYN_OP2_OPTION_PERL -#define REG_SYN_OP2_OPTION_RUBY \ - ONIG_SYN_OP2_OPTION_RUBY -#define REG_SYN_OP2_PLUS_POSSESSIVE_REPEAT \ - ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT -#define REG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL \ - ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL -#define REG_SYN_OP2_CCLASS_SET_OP \ - ONIG_SYN_OP2_CCLASS_SET_OP -#define REG_SYN_OP2_QMARK_LT_NAMED_GROUP \ - ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP -#define REG_SYN_OP2_ESC_K_NAMED_BACKREF \ - ONIG_SYN_OP2_ESC_K_NAMED_BACKREF -#define REG_SYN_OP2_ESC_G_SUBEXP_CALL \ - ONIG_SYN_OP2_ESC_G_SUBEXP_CALL -#define REG_SYN_OP2_ATMARK_CAPTURE_HISTORY \ - ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY -#define REG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL \ - ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL -#define REG_SYN_OP2_ESC_CAPITAL_M_BAR_META \ - ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META -#define REG_SYN_OP2_ESC_V_VTAB \ - ONIG_SYN_OP2_ESC_V_VTAB -#define REG_SYN_OP2_ESC_U_HEX4 \ - ONIG_SYN_OP2_ESC_U_HEX4 -#define REG_SYN_OP2_ESC_GNU_BUF_ANCHOR \ - ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR - -#define REG_SYN_CONTEXT_INDEP_ANCHORS \ - ONIG_SYN_CONTEXT_INDEP_ANCHORS -#define REG_SYN_CONTEXT_INDEP_REPEAT_OPS \ - ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS -#define REG_SYN_CONTEXT_INVALID_REPEAT_OPS \ - ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS -#define REG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP \ - ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP -#define REG_SYN_ALLOW_INVALID_INTERVAL \ - ONIG_SYN_ALLOW_INVALID_INTERVAL -#define REG_SYN_STRICT_CHECK_BACKREF \ - ONIG_SYN_STRICT_CHECK_BACKREF -#define REG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND \ - ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND -#define REG_SYN_CAPTURE_ONLY_NAMED_GROUP \ - ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP -#define REG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME \ - ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME - -#define REG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC \ - ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC -#define REG_SYN_BACKSLASH_ESCAPE_IN_CC \ - ONIG_SYN_BACKSLASH_ESCAPE_IN_CC -#define REG_SYN_ALLOW_EMPTY_RANGE_IN_CC \ - ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC -#define REG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC \ - ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC -#define REG_SYN_WARN_CC_OP_NOT_ESCAPED \ - ONIG_SYN_WARN_CC_OP_NOT_ESCAPED -#define REG_SYN_WARN_REDUNDANT_NESTED_REPEAT \ - ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT - -/* meta character specifiers (regex_set_meta_char()) */ -#define REG_META_CHAR_ESCAPE ONIG_META_CHAR_ESCAPE -#define REG_META_CHAR_ANYCHAR ONIG_META_CHAR_ANYCHAR -#define REG_META_CHAR_ANYTIME ONIG_META_CHAR_ANYTIME -#define REG_META_CHAR_ZERO_OR_ONE_TIME ONIG_META_CHAR_ZERO_OR_ONE_TIME -#define REG_META_CHAR_ONE_OR_MORE_TIME ONIG_META_CHAR_ONE_OR_MORE_TIME -#define REG_META_CHAR_ANYCHAR_ANYTIME ONIG_META_CHAR_ANYCHAR_ANYTIME - -#define REG_INEFFECTIVE_META_CHAR ONIG_INEFFECTIVE_META_CHAR - -/* error codes */ -#define REG_IS_PATTERN_ERROR ONIG_IS_PATTERN_ERROR -/* normal return */ -#define REG_NORMAL ONIG_NORMAL -#define REG_MISMATCH ONIG_MISMATCH -#define REG_NO_SUPPORT_CONFIG ONIG_NO_SUPPORT_CONFIG -/* internal error */ -#define REGERR_MEMORY ONIGERR_MEMORY -#define REGERR_MATCH_STACK_LIMIT_OVER ONIGERR_MATCH_STACK_LIMIT_OVER -#define REGERR_TYPE_BUG ONIGERR_TYPE_BUG -#define REGERR_PARSER_BUG ONIGERR_PARSER_BUG -#define REGERR_STACK_BUG ONIGERR_STACK_BUG -#define REGERR_UNDEFINED_BYTECODE ONIGERR_UNDEFINED_BYTECODE -#define REGERR_UNEXPECTED_BYTECODE ONIGERR_UNEXPECTED_BYTECODE -#define REGERR_DEFAULT_ENCODING_IS_NOT_SETTED \ - ONIGERR_DEFAULT_ENCODING_IS_NOT_SETTED -#define REGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR \ - ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR -/* general error */ -#define REGERR_INVALID_ARGUMENT ONIGERR_INVALID_ARGUMENT -/* errors related to thread */ -#define REGERR_OVER_THREAD_PASS_LIMIT_COUNT \ - ONIGERR_OVER_THREAD_PASS_LIMIT_COUNT - - -/* must be smaller than BIT_STATUS_BITS_NUM (unsigned int * 8) */ -#define REG_MAX_CAPTURE_HISTORY_GROUP ONIG_MAX_CAPTURE_HISTORY_GROUP -#define REG_IS_CAPTURE_HISTORY_GROUP ONIG_IS_CAPTURE_HISTORY_GROUP - -#define REG_REGION_NOTPOS ONIG_REGION_NOTPOS - -#define RegRegion OnigRegion -#define RegErrorInfo OnigErrorInfo -#define RegRepeatRange OnigRepeatRange - -#define RegWarnFunc OnigWarnFunc -#define regex_null_warn onig_null_warn -#define REG_NULL_WARN ONIG_NULL_WARN - -/* regex_t state */ -#define REG_STATE_NORMAL ONIG_STATE_NORMAL -#define REG_STATE_SEARCHING ONIG_STATE_SEARCHING -#define REG_STATE_COMPILING ONIG_STATE_COMPILING -#define REG_STATE_MODIFY ONIG_STATE_MODIFY - -#define REG_STATE ONIG_STATE - -/* Oniguruma Native API */ -#define regex_init onig_init -#define regex_error_code_to_str onig_error_code_to_str -#define regex_set_warn_func onig_set_warn_func -#define regex_set_verb_warn_func onig_set_verb_warn_func -#define regex_new onig_new -#define regex_free onig_free -#define regex_recompile onig_recompile -#define regex_search onig_search -#define regex_match onig_match -#define regex_region_new onig_region_new -#define regex_region_free onig_region_free -#define regex_region_copy onig_region_copy -#define regex_region_clear onig_region_clear -#define regex_region_resize onig_region_resize -#define regex_name_to_group_numbers onig_name_to_group_numbers -#define regex_name_to_backref_number onig_name_to_backref_number -#define regex_foreach_name onig_foreach_name -#define regex_number_of_names onig_number_of_names -#define regex_get_encoding onig_get_encoding -#define regex_get_options onig_get_options -#define regex_get_syntax onig_get_syntax -#define regex_set_default_syntax onig_set_default_syntax -#define regex_copy_syntax onig_copy_syntax -#define regex_set_meta_char onig_set_meta_char -#define regex_end onig_end -#define regex_version onig_version - -/* encoding API */ -#define enc_get_prev_char_head onigenc_get_prev_char_head -#define enc_get_left_adjust_char_head onigenc_get_left_adjust_char_head -#define enc_get_right_adjust_char_head onigenc_get_right_adjust_char_head -/* obsoleted API */ -#define regex_get_prev_char_head onigenc_get_prev_char_head -#define regex_get_left_adjust_char_head onigenc_get_left_adjust_char_head -#define regex_get_right_adjust_char_head onigenc_get_right_adjust_char_head - -#endif /* ONIGCMPT200_H */ diff --git a/ext/mbstring/oniguruma/oniguruma.h b/ext/mbstring/oniguruma/oniguruma.h index bf00e20f63..00f39fe4fe 100644 --- a/ext/mbstring/oniguruma/oniguruma.h +++ b/ext/mbstring/oniguruma/oniguruma.h @@ -36,7 +36,7 @@ extern "C" { #define ONIGURUMA #define ONIGURUMA_VERSION_MAJOR 5 #define ONIGURUMA_VERSION_MINOR 9 -#define ONIGURUMA_VERSION_TEENY 2 +#define ONIGURUMA_VERSION_TEENY 5 #ifdef __cplusplus # ifndef HAVE_PROTOTYPES diff --git a/ext/mbstring/oniguruma/regcomp.c b/ext/mbstring/oniguruma/regcomp.c index f9d99563b3..995e1d8861 100644 --- a/ext/mbstring/oniguruma/regcomp.c +++ b/ext/mbstring/oniguruma/regcomp.c @@ -2399,7 +2399,7 @@ is_not_included(Node* x, Node* y, regex_t* reg) { int i, len; OnigCodePoint code; - UChar *p, c; + UChar *p; int ytype; retry: @@ -2513,51 +2513,51 @@ is_not_included(Node* x, Node* y, regex_t* reg) if (NSTRING_LEN(x) == 0) break; - c = *(xs->s); + //c = *(xs->s); switch (ytype) { case NT_CTYPE: - switch (NCTYPE(y)->ctype) { - case ONIGENC_CTYPE_WORD: - if (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end)) - return NCTYPE(y)->not; - else - return !(NCTYPE(y)->not); - break; - default: - break; - } - break; + switch (NCTYPE(y)->ctype) { + case ONIGENC_CTYPE_WORD: + if (ONIGENC_IS_MBC_WORD(reg->enc, xs->s, xs->end)) + return NCTYPE(y)->not; + else + return !(NCTYPE(y)->not); + break; + default: + break; + } + break; case NT_CCLASS: - { - CClassNode* cc = NCCLASS(y); + { + CClassNode* cc = NCCLASS(y); - code = ONIGENC_MBC_TO_CODE(reg->enc, xs->s, - xs->s + ONIGENC_MBC_MAXLEN(reg->enc)); - return (onig_is_code_in_cc(reg->enc, code, cc) != 0 ? 0 : 1); - } - break; + code = ONIGENC_MBC_TO_CODE(reg->enc, xs->s, + xs->s + ONIGENC_MBC_MAXLEN(reg->enc)); + return (onig_is_code_in_cc(reg->enc, code, cc) != 0 ? 0 : 1); + } + break; case NT_STR: - { - UChar *q; - StrNode* ys = NSTR(y); - len = NSTRING_LEN(x); - if (len > NSTRING_LEN(y)) len = NSTRING_LEN(y); - if (NSTRING_IS_AMBIG(x) || NSTRING_IS_AMBIG(y)) { + { + UChar *q; + StrNode* ys = NSTR(y); + len = NSTRING_LEN(x); + if (len > NSTRING_LEN(y)) len = NSTRING_LEN(y); + if (NSTRING_IS_AMBIG(x) || NSTRING_IS_AMBIG(y)) { /* tiny version */ return 0; - } - else { - for (i = 0, p = ys->s, q = xs->s; i < len; i++, p++, q++) { - if (*p != *q) return 1; - } - } - } - break; + } + else { + for (i = 0, p = ys->s, q = xs->s; i < len; i++, p++, q++) { + if (*p != *q) return 1; + } + } + } + break; default: - break; + break; } } break; @@ -3189,7 +3189,7 @@ next_setup(Node* node, Node* next_node, regex_t* reg) static int update_string_node_case_fold(regex_t* reg, Node *node) { - UChar *p, *q, *end, buf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; + UChar *p, *end, buf[ONIGENC_MBC_CASE_FOLD_MAXLEN]; UChar *sbuf, *ebuf, *sp; int r, i, len, sbuf_size; StrNode* sn = NSTR(node); @@ -3204,14 +3204,13 @@ update_string_node_case_fold(regex_t* reg, Node *node) p = sn->s; while (p < end) { len = ONIGENC_MBC_CASE_FOLD(reg->enc, reg->case_fold_flag, &p, end, buf); - q = buf; for (i = 0; i < len; i++) { if (sp >= ebuf) { - sbuf = (UChar* )xrealloc(sbuf, sbuf_size * 2); - CHECK_NULL_RETURN_MEMERR(sbuf); - sp = sbuf + sbuf_size; - sbuf_size *= 2; - ebuf = sbuf + sbuf_size; + sbuf = (UChar* )xrealloc(sbuf, sbuf_size * 2); + CHECK_NULL_RETURN_MEMERR(sbuf); + sp = sbuf + sbuf_size; + sbuf_size *= 2; + ebuf = sbuf + sbuf_size; } *sp++ = buf[i]; @@ -3316,29 +3315,29 @@ expand_case_fold_string_alt(int item_num, OnigCaseFoldCodeItem items[], UChar *q = p + items[i].byte_len; if (q < end) { - r = expand_case_fold_make_rem_string(&rem, q, end, reg); - if (r != 0) { - onig_node_free(an); - goto mem_err2; - } + r = expand_case_fold_make_rem_string(&rem, q, end, reg); + if (r != 0) { + onig_node_free(an); + goto mem_err2; + } - xnode = onig_node_list_add(NULL_NODE, snode); - if (IS_NULL(xnode)) { - onig_node_free(an); - onig_node_free(rem); - goto mem_err2; - } - if (IS_NULL(onig_node_list_add(xnode, rem))) { - onig_node_free(an); - onig_node_free(xnode); - onig_node_free(rem); - goto mem_err; - } + xnode = onig_node_list_add(NULL_NODE, snode); + if (IS_NULL(xnode)) { + onig_node_free(an); + onig_node_free(rem); + goto mem_err2; + } + if (IS_NULL(onig_node_list_add(xnode, rem))) { + onig_node_free(an); + onig_node_free(xnode); + onig_node_free(rem); + goto mem_err; + } - NCAR(an) = xnode; + NCAR(an) = xnode; } else { - NCAR(an) = snode; + NCAR(an) = snode; } NCDR(var_anode) = an; @@ -6216,8 +6215,7 @@ print_indent_tree(FILE* f, Node* node, int indent) fprintf(f, "<enclose:%x> ", (int )node); switch (NENCLOSE(node)->type) { case ENCLOSE_OPTION: - fprintf(f, "option:%d\n", NENCLOSE(node)->option); - print_indent_tree(f, NENCLOSE(node)->target, indent + add); + fprintf(f, "option:%d", NENCLOSE(node)->option); break; case ENCLOSE_MEMORY: fprintf(f, "memory:%d", NENCLOSE(node)->regnum); diff --git a/ext/mbstring/oniguruma/regparse.c b/ext/mbstring/oniguruma/regparse.c index 01131300c6..bf72300caa 100644 --- a/ext/mbstring/oniguruma/regparse.c +++ b/ext/mbstring/oniguruma/regparse.c @@ -262,6 +262,14 @@ strdup_with_null(OnigEncoding enc, UChar* s, UChar* end) p += ONIGENC_MBC_ENC_LEN(enc, p); \ } while (0) +#define PINC_S do { \ + p += ONIGENC_MBC_ENC_LEN(enc, p); \ +} while (0) +#define PFETCH_S(c) do { \ + c = ONIGENC_MBC_TO_CODE(enc, p, end); \ + p += ONIGENC_MBC_ENC_LEN(enc, p); \ +} while (0) + #define PPEEK (p < end ? ONIGENC_MBC_TO_CODE(enc, p, end) : PEND_VALUE) #define PPEEK_IS(c) (PPEEK == (OnigCodePoint )c) @@ -2404,22 +2412,21 @@ fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env) OnigCodePoint c; OnigEncoding enc = env->enc; UChar* p = *src; - PFETCH_READY; if (PEND) return ONIGERR_END_PATTERN_AT_ESCAPE; - PFETCH(c); + PFETCH_S(c); switch (c) { case 'M': if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META)) { if (PEND) return ONIGERR_END_PATTERN_AT_META; - PFETCH(c); + PFETCH_S(c); if (c != '-') return ONIGERR_META_CODE_SYNTAX; if (PEND) return ONIGERR_END_PATTERN_AT_META; - PFETCH(c); + PFETCH_S(c); if (c == MC_ESC(env->syntax)) { - v = fetch_escaped_value(&p, end, env); - if (v < 0) return v; + v = fetch_escaped_value(&p, end, env); + if (v < 0) return v; c = (OnigCodePoint )v; } c = ((c & 0xff) | 0x80); @@ -2431,7 +2438,7 @@ fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env) case 'C': if (IS_SYNTAX_OP2(env->syntax, ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL)) { if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL; - PFETCH(c); + PFETCH_S(c); if (c != '-') return ONIGERR_CONTROL_CODE_SYNTAX; goto control; } @@ -2442,9 +2449,9 @@ fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env) if (IS_SYNTAX_OP(env->syntax, ONIG_SYN_OP_ESC_C_CONTROL)) { control: if (PEND) return ONIGERR_END_PATTERN_AT_CONTROL; - PFETCH(c); + PFETCH_S(c); if (c == '?') { - c = 0177; + c = 0177; } else { if (c == MC_ESC(env->syntax)) { @@ -2452,7 +2459,7 @@ fetch_escaped_value(UChar** src, UChar* end, ScanEnv* env) if (v < 0) return v; c = (OnigCodePoint )v; } - c &= 0x9f; + c &= 0x9f; } break; } @@ -2546,11 +2553,11 @@ fetch_name_with_level(OnigCodePoint start_code, UChar** src, UChar* end, if (is_num != 0) { if (ONIGENC_IS_CODE_DIGIT(enc, c)) { - is_num = 1; + is_num = 1; } else { - r = ONIGERR_INVALID_GROUP_NAME; - is_num = 0; + r = ONIGERR_INVALID_GROUP_NAME; + is_num = 0; } } else if (!ONIGENC_IS_CODE_WORD(enc, c)) { @@ -2617,7 +2624,6 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end, UChar *name_end; UChar *pnum_head; UChar *p = *src; - PFETCH_READY; *rback_num = 0; @@ -2632,27 +2638,27 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end, return ONIGERR_EMPTY_GROUP_NAME; } else { - PFETCH(c); + PFETCH_S(c); if (c == end_code) return ONIGERR_EMPTY_GROUP_NAME; if (ONIGENC_IS_CODE_DIGIT(enc, c)) { if (ref == 1) - is_num = 1; + is_num = 1; else { - r = ONIGERR_INVALID_GROUP_NAME; - is_num = 0; + r = ONIGERR_INVALID_GROUP_NAME; + is_num = 0; } } else if (c == '-') { if (ref == 1) { - is_num = 2; - sign = -1; - pnum_head = p; + is_num = 2; + sign = -1; + pnum_head = p; } else { - r = ONIGERR_INVALID_GROUP_NAME; - is_num = 0; + r = ONIGERR_INVALID_GROUP_NAME; + is_num = 0; } } else if (!ONIGENC_IS_CODE_WORD(enc, c)) { @@ -2663,29 +2669,28 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end, if (r == 0) { while (!PEND) { name_end = p; - PFETCH(c); + PFETCH_S(c); if (c == end_code || c == ')') { - if (is_num == 2) r = ONIGERR_INVALID_GROUP_NAME; - break; + if (is_num == 2) r = ONIGERR_INVALID_GROUP_NAME; + break; } if (is_num != 0) { - if (ONIGENC_IS_CODE_DIGIT(enc, c)) { - is_num = 1; - } - else { - if (!ONIGENC_IS_CODE_WORD(enc, c)) - r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; - else - r = ONIGERR_INVALID_GROUP_NAME; - - is_num = 0; - } + if (ONIGENC_IS_CODE_DIGIT(enc, c)) { + is_num = 1; + } + else { + if (!ONIGENC_IS_CODE_WORD(enc, c)) + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + else + r = ONIGERR_INVALID_GROUP_NAME; + is_num = 0; + } } else { - if (!ONIGENC_IS_CODE_WORD(enc, c)) { - r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; - } + if (!ONIGENC_IS_CODE_WORD(enc, c)) { + r = ONIGERR_INVALID_CHAR_IN_GROUP_NAME; + } } } @@ -2698,8 +2703,8 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end, *rback_num = onig_scan_unsigned_number(&pnum_head, name_end, enc); if (*rback_num < 0) return ONIGERR_TOO_BIG_NUMBER; else if (*rback_num == 0) { - r = ONIGERR_INVALID_GROUP_NAME; - goto err; + r = ONIGERR_INVALID_GROUP_NAME; + goto err; } *rback_num *= sign; @@ -2712,9 +2717,9 @@ fetch_name(OnigCodePoint start_code, UChar** src, UChar* end, else { while (!PEND) { name_end = p; - PFETCH(c); + PFETCH_S(c); if (c == end_code || c == ')') - break; + break; } if (PEND) name_end = end; @@ -3935,10 +3940,9 @@ parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env) OnigCodePoint c; OnigEncoding enc = env->enc; UChar *p = *src; - PFETCH_READY; if (PPEEK_IS('^')) { - PINC; + PINC_S; not = 1; } else @@ -3951,12 +3955,12 @@ parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env) if (onigenc_with_ascii_strncmp(enc, p, end, pb->name, pb->len) == 0) { p = (UChar* )onigenc_step(enc, p, end, pb->len); if (onigenc_with_ascii_strncmp(enc, p, end, (UChar* )":]", 2) != 0) - return ONIGERR_INVALID_POSIX_BRACKET_TYPE; + return ONIGERR_INVALID_POSIX_BRACKET_TYPE; r = add_ctype_to_cc(cc, pb->ctype, not, env); if (r != 0) return r; - PINC; PINC; + PINC_S; PINC_S; *src = p; return 0; } @@ -3966,15 +3970,15 @@ parse_posix_bracket(CClassNode* cc, UChar** src, UChar* end, ScanEnv* env) c = 0; i = 0; while (!PEND && ((c = PPEEK) != ':') && c != ']') { - PINC; + PINC_S; if (++i > POSIX_BRACKET_CHECK_LIMIT_LENGTH) break; } if (c == ':' && ! PEND) { - PINC; + PINC_S; if (! PEND) { - PFETCH(c); + PFETCH_S(c); if (c == ']') - return ONIGERR_INVALID_POSIX_BRACKET_TYPE; + return ONIGERR_INVALID_POSIX_BRACKET_TYPE; } } @@ -3988,14 +3992,13 @@ fetch_char_property_to_ctype(UChar** src, UChar* end, ScanEnv* env) OnigCodePoint c; OnigEncoding enc = env->enc; UChar *prev, *start, *p = *src; - PFETCH_READY; r = 0; start = prev = p; while (!PEND) { prev = p; - PFETCH(c); + PFETCH_S(c); if (c == '}') { r = ONIGENC_PROPERTY_NAME_TO_CTYPE(enc, start, prev); if (r < 0) break; @@ -4153,7 +4156,6 @@ code_exist_check(OnigCodePoint c, UChar* from, UChar* end, int ignore_escaped, OnigCodePoint code; OnigEncoding enc = env->enc; UChar* p = from; - PFETCH_READY; in_esc = 0; while (! PEND) { @@ -4161,7 +4163,7 @@ code_exist_check(OnigCodePoint c, UChar* from, UChar* end, int ignore_escaped, in_esc = 0; } else { - PFETCH(code); + PFETCH_S(code); if (code == c) return 1; if (code == MC_ESC(env->syntax)) in_esc = 1; } diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 6cdee23c3e..67951a828e 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -64,8 +64,8 @@ static void php_mb_regex_free_cache(php_mb_regex_t **pre) /* {{{ _php_mb_regex_globals_ctor */ static int _php_mb_regex_globals_ctor(zend_mb_regex_globals *pglobals TSRMLS_DC) { - pglobals->default_mbctype = ONIG_ENCODING_EUC_JP; - pglobals->current_mbctype = ONIG_ENCODING_EUC_JP; + pglobals->default_mbctype = ONIG_ENCODING_UTF8; + pglobals->current_mbctype = ONIG_ENCODING_UTF8; zend_hash_init(&(pglobals->ht_rc), 0, NULL, (void (*)(void *)) php_mb_regex_free_cache, 1); pglobals->search_str = (zval*) NULL; pglobals->search_re = (php_mb_regex_t*)NULL; diff --git a/ext/mbstring/php_mbregex.h b/ext/mbstring/php_mbregex.h index 7723eec008..82fef75cbe 100644 --- a/ext/mbstring/php_mbregex.h +++ b/ext/mbstring/php_mbregex.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index 6c19857f5c..d8cdfced5d 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mbstring/php_unicode.h b/ext/mbstring/php_unicode.h index de2c261622..03646c41d2 100644 --- a/ext/mbstring/php_unicode.h +++ b/ext/mbstring/php_unicode.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mbstring/tests/bug48697.phpt b/ext/mbstring/tests/bug48697.phpt index 42bbe9f5a8..93644a5f05 100644 --- a/ext/mbstring/tests/bug48697.phpt +++ b/ext/mbstring/tests/bug48697.phpt @@ -2,6 +2,8 @@ Bug #48697 (mb_internal_encoding() value gets reset by parse_str() or mb_parse_str() --SKIPIF-- <?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--INI-- +error_reporting=E_ALL & ~E_DEPRECATED --FILE-- <?php ini_set('mbstring.internal_encoding', 'ISO-8859-15'); diff --git a/ext/mbstring/tests/ini_encoding.phpt b/ext/mbstring/tests/ini_encoding.phpt new file mode 100644 index 0000000000..b9809b2bfe --- /dev/null +++ b/ext/mbstring/tests/ini_encoding.phpt @@ -0,0 +1,74 @@ +--TEST-- +Encoding INI test +--SKIPIF-- +<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--INI-- +error_reporting=E_ALL & ~E_DEPRECATED +default_charset=Shift_JIS +internal_encoding= +input_encoding= +output_encoding= +mbstring.internal_encoding=Shift_JIS +mbstring.http_input=Shift_JIS +mbstring.http_output=Shift_JIS +--FILE-- +<?php +echo "Getting INI\n"; +var_dump(ini_get('default_charset')); +var_dump(ini_get('internal_encoding')); +var_dump(ini_get('input_encoding')); +var_dump(ini_get('output_encoding')); + +var_dump(ini_get('mbstring.internal_encoding')); +var_dump(mb_internal_encoding()); +var_dump(ini_get('mbstring.http_input')); +var_dump(ini_get('mbstring.http_output')); + +echo "Setting INI\n"; +var_dump(ini_set('default_charset', 'UTF-8')); +var_dump(ini_set('internal_encoding', 'UTF-8')); +var_dump(ini_set('input_encoding', 'UTF-8')); +var_dump(ini_set('output_encoding', 'UTF-8')); +var_dump(ini_set('mbstring.internal_encoding', 'UTF-8')); +var_dump(ini_set('mbstring.http_input', 'UTF-8')); +var_dump(ini_set('mbstring.http_output', 'UTF-8')); + +echo "Getting INI\n"; +var_dump(ini_get('default_charset')); +var_dump(ini_get('internal_encoding')); +var_dump(ini_get('input_encoding')); +var_dump(ini_get('output_encoding')); + +var_dump(ini_get('mbstring.internal_encoding')); +var_dump(mb_internal_encoding()); +var_dump(ini_get('mbstring.http_input')); +var_dump(ini_get('mbstring.http_output')); + + +--EXPECT-- +Getting INI +string(9) "Shift_JIS" +string(0) "" +string(0) "" +string(0) "" +string(9) "Shift_JIS" +string(4) "SJIS" +string(9) "Shift_JIS" +string(9) "Shift_JIS" +Setting INI +string(9) "Shift_JIS" +string(0) "" +string(0) "" +string(0) "" +string(9) "Shift_JIS" +string(9) "Shift_JIS" +string(9) "Shift_JIS" +Getting INI +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-8" +string(5) "UTF-8" diff --git a/ext/mbstring/tests/mb_eregi_replace.phpt b/ext/mbstring/tests/mb_eregi_replace.phpt index 22ba0af13d..0405d8984c 100644 --- a/ext/mbstring/tests/mb_eregi_replace.phpt +++ b/ext/mbstring/tests/mb_eregi_replace.phpt @@ -27,8 +27,9 @@ function do_translit($st) { $st = mb_eregi_replace($i,$u,$st); } return $st; -} +} +mb_regex_encoding('ISO-8859-1'); echo do_translit("Пеар"); ?> --EXPECT-- diff --git a/ext/mbstring/tests/mb_strtolower_variation3.phpt b/ext/mbstring/tests/mb_strtolower_variation3.phpt index 08b3467853..99256e1ec4 100644 --- a/ext/mbstring/tests/mb_strtolower_variation3.phpt +++ b/ext/mbstring/tests/mb_strtolower_variation3.phpt @@ -14,7 +14,7 @@ function_exists('mb_strtolower') or die("skip mb_strtolower() is not available i /* * Pass a Japanese string and a mixed Japanese and ASCII string to mb_strtolower - * to check correct conversion is occuring (Japanese characters should not be converted). + * to check correct conversion is occurring (Japanese characters should not be converted). */ echo "*** Testing mb_strtolower() : usage variations ***\n"; diff --git a/ext/mbstring/tests/mb_strtoupper_variation3.phpt b/ext/mbstring/tests/mb_strtoupper_variation3.phpt index a4bf3b128f..f0cb0fa47c 100644 --- a/ext/mbstring/tests/mb_strtoupper_variation3.phpt +++ b/ext/mbstring/tests/mb_strtoupper_variation3.phpt @@ -14,7 +14,7 @@ function_exists('mb_strtoupper') or die("skip mb_strtoupper() is not available i /* * Pass a Japanese string and a mixed Japanese and ASCII string to mb_strtolower - * to check correct conversion is occuring (Japanese characters should not be converted). + * to check correct conversion is occurring (Japanese characters should not be converted). */ echo "*** Testing mb_strtoupper() : usage variations ***\n"; diff --git a/ext/mbstring/tests/zend_multibyte-07.phpt b/ext/mbstring/tests/zend_multibyte-07.phpt index 08db1d0f70..50d4cd95ed 100644 --- a/ext/mbstring/tests/zend_multibyte-07.phpt +++ b/ext/mbstring/tests/zend_multibyte-07.phpt @@ -4,6 +4,7 @@ zend multibyte (7) --XFAIL-- https://bugs.php.net/bug.php?id=66582 --INI-- +error_reporting=E_ALL & ~E_DEPRECATED zend.multibyte=On zend.script_encoding=ISO-8859-1 mbstring.internal_encoding=EUC-JP diff --git a/ext/mbstring/tests/zend_multibyte-08.phpt b/ext/mbstring/tests/zend_multibyte-08.phpt index a0989fc562..561ad64038 100644 --- a/ext/mbstring/tests/zend_multibyte-08.phpt +++ b/ext/mbstring/tests/zend_multibyte-08.phpt @@ -2,7 +2,7 @@ zend multibyte (8) --SKIPIF-- --XFAIL-- -https://bugs.php.net/bug.php?id=66582 +https://bugs.php.net/bug.php?id=66582 - still leaks memory which causes fail in debug mode --INI-- zend.multibyte=On zend.script_encoding=ISO-8859-1 diff --git a/ext/mbstring/tests/zend_multibyte-09.phpt b/ext/mbstring/tests/zend_multibyte-09.phpt index 8ad00b4e1e..7b0015c6c1 100644 --- a/ext/mbstring/tests/zend_multibyte-09.phpt +++ b/ext/mbstring/tests/zend_multibyte-09.phpt @@ -4,6 +4,7 @@ zend multibyte (9) --XFAIL-- https://bugs.php.net/bug.php?id=66582 --INI-- +error_reporting=E_ALL & ~E_DEPRECATED zend.multibyte=On zend.script_encoding=cp1251 mbstring.internal_encoding=UTF-8 diff --git a/ext/mbstring/tests/zend_multibyte-10.phpt b/ext/mbstring/tests/zend_multibyte-10.phpt index 139d973b95..b4f85e6f35 100644 --- a/ext/mbstring/tests/zend_multibyte-10.phpt +++ b/ext/mbstring/tests/zend_multibyte-10.phpt @@ -1,6 +1,8 @@ --TEST-- zend multibyte (10) --SKIPIF-- +--XFAIL-- +https://bugs.php.net/bug.php?id=66582 - still leaks memory which causes fail in debug mode --INI-- zend.multibyte=1 --FILE-- diff --git a/ext/mbstring/tests/zend_multibyte-11.phpt b/ext/mbstring/tests/zend_multibyte-11.phpt index c6e45fa5cd..eadbb2156d 100644 --- a/ext/mbstring/tests/zend_multibyte-11.phpt +++ b/ext/mbstring/tests/zend_multibyte-11.phpt @@ -1,6 +1,8 @@ --TEST-- zend multibyte (11) --SKIPIF-- +--XFAIL-- +https://bugs.php.net/bug.php?id=66582 - still leaks memory which causes fail in debug mode --INI-- zend.multibyte=1 --FILE-- |