Lines Matching refs:MBSTRG

218 		zend_string *last_encoding_name = MBSTRG(last_used_encoding_name);  in php_mb_get_encoding()
221 return MBSTRG(last_used_encoding); in php_mb_get_encoding()
233 MBSTRG(last_used_encoding_name) = zend_string_copy(encoding_name); in php_mb_get_encoding()
234 MBSTRG(last_used_encoding) = encoding; in php_mb_get_encoding()
237 return MBSTRG(current_internal_encoding); in php_mb_get_encoding()
285 size = 1 + count_commas(tmpstr, endp) + MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_list()
307 const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); in php_mb_parse_encoding_list()
308 const size_t identify_list_size = MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_list()
356 size_t size = zend_hash_num_elements(target_hash) + MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_array()
371 const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); in php_mb_parse_encoding_array()
372 const size_t identify_list_size = MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_array()
429 list = (const zend_encoding **)MBSTRG(current_detect_order_list); in php_mb_zend_encoding_detector()
430 list_size = MBSTRG(current_detect_order_list_size); in php_mb_zend_encoding_detector()
456 mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode)); in php_mb_zend_encoding_converter()
457 mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar)); in php_mb_zend_encoding_converter()
487 return (const zend_encoding *)MBSTRG(internal_encoding); in php_mb_zend_internal_encoding_getter()
492 MBSTRG(internal_encoding) = (const mbfl_encoding *)encoding; in php_mb_zend_internal_encoding_setter()
696 MBSTRG(language) = mbfl_no_language_neutral; in PHP_INI_MH()
699 MBSTRG(language) = no_language; in PHP_INI_MH()
700 …php_mb_nls_get_default_detect_order_list(no_language, &MBSTRG(default_detect_order_list), &MBSTRG(… in PHP_INI_MH()
712 if (MBSTRG(detect_order_list)) { in PHP_INI_MH()
713 pefree(ZEND_VOIDP(MBSTRG(detect_order_list)), 1); in PHP_INI_MH()
715 MBSTRG(detect_order_list) = NULL; in PHP_INI_MH()
716 MBSTRG(detect_order_list_size) = 0; in PHP_INI_MH()
724 if (MBSTRG(detect_order_list)) { in PHP_INI_MH()
725 pefree(ZEND_VOIDP(MBSTRG(detect_order_list)), 1); in PHP_INI_MH()
727 MBSTRG(detect_order_list) = list; in PHP_INI_MH()
728 MBSTRG(detect_order_list_size) = size; in PHP_INI_MH()
739 if (MBSTRG(http_input_list)) { in _php_mb_ini_mbstring_http_input_set()
740 pefree(ZEND_VOIDP(MBSTRG(http_input_list)), 1); in _php_mb_ini_mbstring_http_input_set()
742 MBSTRG(http_input_list) = list; in _php_mb_ini_mbstring_http_input_set()
743 MBSTRG(http_input_list_size) = size; in _php_mb_ini_mbstring_http_input_set()
756 MBSTRG(http_input_set) = 0; in PHP_INI_MH()
761 MBSTRG(http_input_set) = 1; in PHP_INI_MH()
772 MBSTRG(http_output_encoding) = encoding; in _php_mb_ini_mbstring_http_output_set()
773 MBSTRG(current_http_output_encoding) = encoding; in _php_mb_ini_mbstring_http_output_set()
785 MBSTRG(http_output_set) = 0; in PHP_INI_MH()
790 MBSTRG(http_output_set) = 1; in PHP_INI_MH()
807 MBSTRG(internal_encoding) = encoding; in _php_mb_ini_mbstring_internal_encoding_set()
808 MBSTRG(current_internal_encoding) = encoding; in _php_mb_ini_mbstring_internal_encoding_set()
836 MBSTRG(internal_encoding_set) = 1; in PHP_INI_MH()
840 MBSTRG(internal_encoding_set) = 0; in PHP_INI_MH()
854 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE; in PHP_INI_MH()
855 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE; in PHP_INI_MH()
857 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG; in PHP_INI_MH()
858 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG; in PHP_INI_MH()
860 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY; in PHP_INI_MH()
861 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY; in PHP_INI_MH()
863 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_INI_MH()
864 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_INI_MH()
868 MBSTRG(filter_illegal_substchar) = c; in PHP_INI_MH()
869 MBSTRG(current_filter_illegal_substchar) = c; in PHP_INI_MH()
874 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_INI_MH()
875 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_INI_MH()
876 MBSTRG(filter_illegal_substchar) = 0x3f; /* '?' */ in PHP_INI_MH()
877 MBSTRG(current_filter_illegal_substchar) = 0x3f; /* '?' */ in PHP_INI_MH()
893 if (MBSTRG(encoding_translation)) { in PHP_INI_MH()
923 if (MBSTRG(http_output_conv_mimetypes)) { in PHP_INI_MH()
924 _php_mb_free_regex(MBSTRG(http_output_conv_mimetypes)); in PHP_INI_MH()
927 MBSTRG(http_output_conv_mimetypes) = re; in PHP_INI_MH()
966 if (!MBSTRG(internal_encoding_set)) { in PHP_INI_END()
971 if (!MBSTRG(http_output_set)) { in PHP_INI_END()
976 if (!MBSTRG(http_input_set)) { in PHP_INI_END()
1063 if (MBSTRG(encoding_translation)) { in PHP_MINIT_FUNCTION()
1116 MBSTRG(current_internal_encoding) = MBSTRG(internal_encoding); in PHP_RINIT_FUNCTION()
1117 MBSTRG(current_http_output_encoding) = MBSTRG(http_output_encoding); in PHP_RINIT_FUNCTION()
1118 MBSTRG(current_filter_illegal_mode) = MBSTRG(filter_illegal_mode); in PHP_RINIT_FUNCTION()
1119 MBSTRG(current_filter_illegal_substchar) = MBSTRG(filter_illegal_substchar); in PHP_RINIT_FUNCTION()
1121 MBSTRG(illegalchars) = 0; in PHP_RINIT_FUNCTION()
1128 zend_multibyte_set_internal_encoding((const zend_encoding *)MBSTRG(internal_encoding)); in PHP_RINIT_FUNCTION()
1137 if (MBSTRG(current_detect_order_list) != NULL) { in PHP_RSHUTDOWN_FUNCTION()
1138 efree(ZEND_VOIDP(MBSTRG(current_detect_order_list))); in PHP_RSHUTDOWN_FUNCTION()
1139 MBSTRG(current_detect_order_list) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1140 MBSTRG(current_detect_order_list_size) = 0; in PHP_RSHUTDOWN_FUNCTION()
1142 if (MBSTRG(outconv) != NULL) { in PHP_RSHUTDOWN_FUNCTION()
1143 MBSTRG(illegalchars) += mbfl_buffer_illegalchars(MBSTRG(outconv)); in PHP_RSHUTDOWN_FUNCTION()
1144 mbfl_buffer_converter_delete(MBSTRG(outconv)); in PHP_RSHUTDOWN_FUNCTION()
1145 MBSTRG(outconv) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1149 MBSTRG(http_input_identify) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1150 MBSTRG(http_input_identify_post) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1151 MBSTRG(http_input_identify_get) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1152 MBSTRG(http_input_identify_cookie) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1153 MBSTRG(http_input_identify_string) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1155 if (MBSTRG(last_used_encoding_name)) { in PHP_RSHUTDOWN_FUNCTION()
1156 zend_string_release(MBSTRG(last_used_encoding_name)); in PHP_RSHUTDOWN_FUNCTION()
1157 MBSTRG(last_used_encoding_name) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1160 MBSTRG(internal_encoding_set) = 0; in PHP_RSHUTDOWN_FUNCTION()
1161 MBSTRG(http_output_set) = 0; in PHP_RSHUTDOWN_FUNCTION()
1162 MBSTRG(http_input_set) = 0; in PHP_RSHUTDOWN_FUNCTION()
1178 …php_info_print_table_row(2, "HTTP input encoding translation", MBSTRG(encoding_translation) ? "ena… in PHP_MINFO_FUNCTION()
1209 RETVAL_STRING((char *)mbfl_no_language2name(MBSTRG(language))); in PHP_FUNCTION()
1237 ZEND_ASSERT(MBSTRG(current_internal_encoding)); in PHP_FUNCTION()
1238 RETURN_STRING(MBSTRG(current_internal_encoding)->name); in PHP_FUNCTION()
1245 MBSTRG(current_internal_encoding) = encoding; in PHP_FUNCTION()
1246 MBSTRG(internal_encoding_set) = 1; in PHP_FUNCTION()
1268 encoding = MBSTRG(http_input_identify); in PHP_FUNCTION()
1273 encoding = MBSTRG(http_input_identify_get); in PHP_FUNCTION()
1277 encoding = MBSTRG(http_input_identify_post); in PHP_FUNCTION()
1281 encoding = MBSTRG(http_input_identify_cookie); in PHP_FUNCTION()
1285 encoding = MBSTRG(http_input_identify_string); in PHP_FUNCTION()
1289 entry = MBSTRG(http_input_list); in PHP_FUNCTION()
1290 n = MBSTRG(http_input_list_size); in PHP_FUNCTION()
1298 entry = MBSTRG(http_input_list); in PHP_FUNCTION()
1299 n = MBSTRG(http_input_list_size); in PHP_FUNCTION()
1344 ZEND_ASSERT(MBSTRG(current_http_output_encoding)); in PHP_FUNCTION()
1345 RETURN_STRING(MBSTRG(current_http_output_encoding)->name); in PHP_FUNCTION()
1352 MBSTRG(http_output_set) = 1; in PHP_FUNCTION()
1353 MBSTRG(current_http_output_encoding) = encoding; in PHP_FUNCTION()
1373 size_t n = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
1374 const mbfl_encoding **entry = MBSTRG(current_detect_order_list); in PHP_FUNCTION()
1399 if (MBSTRG(current_detect_order_list)) { in PHP_FUNCTION()
1400 efree(ZEND_VOIDP(MBSTRG(current_detect_order_list))); in PHP_FUNCTION()
1402 MBSTRG(current_detect_order_list) = list; in PHP_FUNCTION()
1403 MBSTRG(current_detect_order_list_size) = size; in PHP_FUNCTION()
1441 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { in PHP_FUNCTION()
1444 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { in PHP_FUNCTION()
1447 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) { in PHP_FUNCTION()
1450 RETURN_LONG(MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
1455 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE; in PHP_FUNCTION()
1459 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG; in PHP_FUNCTION()
1463 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY; in PHP_FUNCTION()
1476 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_FUNCTION()
1477 MBSTRG(current_filter_illegal_substchar) = substitute_codepoint; in PHP_FUNCTION()
1536 info.to_encoding = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
1537 info.to_language = MBSTRG(language); in PHP_FUNCTION()
1538 info.from_encodings = MBSTRG(http_input_list); in PHP_FUNCTION()
1539 info.num_from_encodings = MBSTRG(http_input_list_size); in PHP_FUNCTION()
1540 info.from_language = MBSTRG(language); in PHP_FUNCTION()
1544 MBSTRG(http_input_identify) = detected; in PHP_FUNCTION()
1572 encoding = MBSTRG(current_http_output_encoding); in PHP_FUNCTION()
1577 if (MBSTRG(outconv)) { in PHP_FUNCTION()
1578 MBSTRG(illegalchars) += mbfl_buffer_illegalchars(MBSTRG(outconv)); in PHP_FUNCTION()
1579 mbfl_buffer_converter_delete(MBSTRG(outconv)); in PHP_FUNCTION()
1580 MBSTRG(outconv) = NULL; in PHP_FUNCTION()
1590 MBSTRG(http_output_conv_mimetypes), in PHP_FUNCTION()
1613 MBSTRG(outconv) = mbfl_buffer_converter_new(MBSTRG(current_internal_encoding), encoding, 0); in PHP_FUNCTION()
1621 if (MBSTRG(outconv) == NULL) { in PHP_FUNCTION()
1628 mbfl_buffer_converter_illegal_mode(MBSTRG(outconv), MBSTRG(current_filter_illegal_mode)); in PHP_FUNCTION()
1629 mbfl_buffer_converter_illegal_substchar(MBSTRG(outconv), MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
1639 mbfl_buffer_converter_feed(MBSTRG(outconv), &string); in PHP_FUNCTION()
1641 mbfl_buffer_converter_flush(MBSTRG(outconv)); in PHP_FUNCTION()
1644 mbfl_buffer_converter_result(MBSTRG(outconv), &result); in PHP_FUNCTION()
1652 MBSTRG(illegalchars) += mbfl_buffer_illegalchars(MBSTRG(outconv)); in PHP_FUNCTION()
1653 mbfl_buffer_converter_delete(MBSTRG(outconv)); in PHP_FUNCTION()
1654 MBSTRG(outconv) = NULL; in PHP_FUNCTION()
2382 mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode)); in php_mb_convert_encoding_ex()
2383 mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar)); in php_mb_convert_encoding_ex()
2395 MBSTRG(illegalchars) += mbfl_buffer_illegalchars(convd); in php_mb_convert_encoding_ex()
2421 &string, from_encodings, num_from_encodings, MBSTRG(strict_detection)); in php_mb_convert_encoding()
2547 from_encodings = &MBSTRG(current_internal_encoding); in PHP_FUNCTION()
2588 MBSTRG(current_filter_illegal_mode), MBSTRG(current_filter_illegal_substchar)); in mbstring_convert_case()
2719 elist = MBSTRG(current_detect_order_list); in PHP_FUNCTION()
2720 size = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
2731 strict = MBSTRG(strict_detection); in PHP_FUNCTION()
2800 string.encoding = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
2821 const mbfl_language *lang = mbfl_no2language(MBSTRG(language)); in PHP_FUNCTION()
2851 string.encoding = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
2859 ret = mbfl_mime_header_decode(&string, &result, MBSTRG(current_internal_encoding)); in PHP_FUNCTION()
3088 from_encoding = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
3114 identd = mbfl_encoding_detector_new(elist, elistsz, MBSTRG(strict_detection)); in PHP_FUNCTION()
3145 mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode)); in PHP_FUNCTION()
3146 mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
3161 MBSTRG(illegalchars) += mbfl_buffer_illegalchars(convd); in PHP_FUNCTION()
3492 lang = mbfl_no2language(MBSTRG(language)); in PHP_FUNCTION()
3610 orig_str.encoding = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
3613 …= mbfl_identify_encoding(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order… in PHP_FUNCTION()
3623 orig_str.encoding = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
3627 …= mbfl_identify_encoding(&orig_str, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order… in PHP_FUNCTION()
3738 const mbfl_language *lang = mbfl_no2language(MBSTRG(language)); in PHP_FUNCTION()
3748 if (MBSTRG(current_internal_encoding)) { in PHP_FUNCTION()
3749 …add_assoc_string(return_value, "internal_encoding", (char *)MBSTRG(current_internal_encoding)->nam… in PHP_FUNCTION()
3751 if (MBSTRG(http_input_identify)) { in PHP_FUNCTION()
3752 add_assoc_string(return_value, "http_input", (char *)MBSTRG(http_input_identify)->name); in PHP_FUNCTION()
3754 if (MBSTRG(current_http_output_encoding)) { in PHP_FUNCTION()
3755 … add_assoc_string(return_value, "http_output", (char *)MBSTRG(current_http_output_encoding)->name); in PHP_FUNCTION()
3771 add_assoc_long(return_value, "illegal_chars", MBSTRG(illegalchars)); in PHP_FUNCTION()
3772 if (MBSTRG(encoding_translation)) { in PHP_FUNCTION()
3777 if ((name = (char *)mbfl_no_language2name(MBSTRG(language))) != NULL) { in PHP_FUNCTION()
3780 n = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
3781 entry = MBSTRG(current_detect_order_list); in PHP_FUNCTION()
3791 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { in PHP_FUNCTION()
3793 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { in PHP_FUNCTION()
3795 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) { in PHP_FUNCTION()
3798 add_assoc_long(return_value, "substitute_character", MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
3800 if (MBSTRG(strict_detection)) { in PHP_FUNCTION()
3806 if (MBSTRG(current_internal_encoding)) { in PHP_FUNCTION()
3807 RETVAL_STRING((char *)MBSTRG(current_internal_encoding)->name); in PHP_FUNCTION()
3810 if (MBSTRG(http_input_identify)) { in PHP_FUNCTION()
3811 RETVAL_STRING((char *)MBSTRG(http_input_identify)->name); in PHP_FUNCTION()
3814 if (MBSTRG(current_http_output_encoding)) { in PHP_FUNCTION()
3815 RETVAL_STRING((char *)MBSTRG(current_http_output_encoding)->name); in PHP_FUNCTION()
3834 RETVAL_LONG(MBSTRG(illegalchars)); in PHP_FUNCTION()
3836 if (MBSTRG(encoding_translation)) { in PHP_FUNCTION()
3842 if ((name = (char *)mbfl_no_language2name(MBSTRG(language))) != NULL) { in PHP_FUNCTION()
3846 n = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
3847 entry = MBSTRG(current_detect_order_list); in PHP_FUNCTION()
3857 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { in PHP_FUNCTION()
3859 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { in PHP_FUNCTION()
3861 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) { in PHP_FUNCTION()
3864 RETVAL_LONG(MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
3867 if (MBSTRG(strict_detection)) { in PHP_FUNCTION()
4010 RETURN_BOOL(MBSTRG(illegalchars) == 0); in PHP_FUNCTION()
4158 long orig_illegalchars = MBSTRG(illegalchars); in php_mb_chr()
4159 MBSTRG(illegalchars) = 0; in php_mb_chr()
4161 if (MBSTRG(illegalchars) != 0) { in php_mb_chr()
4164 MBSTRG(illegalchars) = orig_illegalchars; in php_mb_chr()
4170 MBSTRG(illegalchars) = orig_illegalchars; in php_mb_chr()
4231 if (MBSTRG(detect_order_list) && MBSTRG(detect_order_list_size)) { in php_mb_populate_current_detect_order_list()
4232 nentries = MBSTRG(detect_order_list_size); in php_mb_populate_current_detect_order_list()
4234 memcpy(ZEND_VOIDP(entry), MBSTRG(detect_order_list), sizeof(mbfl_encoding*) * nentries); in php_mb_populate_current_detect_order_list()
4236 const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); in php_mb_populate_current_detect_order_list()
4238 nentries = MBSTRG(default_detect_order_list_size); in php_mb_populate_current_detect_order_list()
4244 MBSTRG(current_detect_order_list) = entry; in php_mb_populate_current_detect_order_list()
4245 MBSTRG(current_detect_order_list_size) = nentries; in php_mb_populate_current_detect_order_list()
4252 return MBSTRG(encoding_translation); in php_mb_encoding_translation()
4277 return php_mb_mbchar_bytes_ex(s, MBSTRG(internal_encoding)); in php_mb_mbchar_bytes()
4325 return php_mb_safe_strrchr_ex(s, c, nbytes, MBSTRG(internal_encoding)); in php_mb_safe_strrchr()
4378 *list = (const zend_encoding **)MBSTRG(http_input_list); in php_mb_gpc_get_detect_order()
4379 *list_size = MBSTRG(http_input_list_size); in php_mb_gpc_get_detect_order()
4385 MBSTRG(http_input_identify) = (const mbfl_encoding*)encoding; in php_mb_gpc_set_input_encoding()