Lines Matching refs:MBSTRG

244 		zend_string *last_encoding_name = MBSTRG(last_used_encoding_name);  in php_mb_get_encoding()
247 return MBSTRG(last_used_encoding); in php_mb_get_encoding()
269 MBSTRG(last_used_encoding_name) = zend_string_copy(encoding_name); in php_mb_get_encoding()
270 MBSTRG(last_used_encoding) = encoding; in php_mb_get_encoding()
273 return MBSTRG(current_internal_encoding); in php_mb_get_encoding()
319 size = 1 + count_commas(tmpstr, endp) + MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_list()
340 const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); in php_mb_parse_encoding_list()
341 const size_t identify_list_size = MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_list()
386 size_t size = zend_hash_num_elements(target_hash) + MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_array()
401 const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); in php_mb_parse_encoding_array()
402 const size_t identify_list_size = MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_array()
451 list = (const zend_encoding**)MBSTRG(current_detect_order_list); in php_mb_zend_encoding_detector()
452 list_size = MBSTRG(current_detect_order_list_size); in php_mb_zend_encoding_detector()
465 …*)encoding_from, (const mbfl_encoding*)encoding_to, MBSTRG(current_filter_illegal_substchar), MBST… in php_mb_zend_encoding_converter()
485 return (const zend_encoding *)MBSTRG(internal_encoding); in php_mb_zend_internal_encoding_getter()
490 MBSTRG(internal_encoding) = (const mbfl_encoding *)encoding; in php_mb_zend_internal_encoding_setter()
694 MBSTRG(language) = mbfl_no_language_neutral; in PHP_INI_MH()
697 MBSTRG(language) = no_language; in PHP_INI_MH()
698 …php_mb_nls_get_default_detect_order_list(no_language, &MBSTRG(default_detect_order_list), &MBSTRG(… in PHP_INI_MH()
710 if (MBSTRG(detect_order_list)) { in PHP_INI_MH()
711 pefree(ZEND_VOIDP(MBSTRG(detect_order_list)), 1); in PHP_INI_MH()
713 MBSTRG(detect_order_list) = NULL; in PHP_INI_MH()
714 MBSTRG(detect_order_list_size) = 0; in PHP_INI_MH()
722 if (MBSTRG(detect_order_list)) { in PHP_INI_MH()
723 pefree(ZEND_VOIDP(MBSTRG(detect_order_list)), 1); in PHP_INI_MH()
725 MBSTRG(detect_order_list) = list; in PHP_INI_MH()
726 MBSTRG(detect_order_list_size) = size; in PHP_INI_MH()
741 if (MBSTRG(http_input_list)) { in _php_mb_ini_mbstring_http_input_set()
742 pefree(ZEND_VOIDP(MBSTRG(http_input_list)), 1); in _php_mb_ini_mbstring_http_input_set()
744 MBSTRG(http_input_list) = list; in _php_mb_ini_mbstring_http_input_set()
745 MBSTRG(http_input_list_size) = size; in _php_mb_ini_mbstring_http_input_set()
758 MBSTRG(http_input_set) = 0; in PHP_INI_MH()
763 MBSTRG(http_input_set) = 1; in PHP_INI_MH()
774 MBSTRG(http_output_encoding) = encoding; in _php_mb_ini_mbstring_http_output_set()
775 MBSTRG(current_http_output_encoding) = encoding; in _php_mb_ini_mbstring_http_output_set()
788 MBSTRG(http_output_set) = 0; in PHP_INI_MH()
793 MBSTRG(http_output_set) = 1; in PHP_INI_MH()
810 MBSTRG(internal_encoding) = encoding; in _php_mb_ini_mbstring_internal_encoding_set()
811 MBSTRG(current_internal_encoding) = encoding; in _php_mb_ini_mbstring_internal_encoding_set()
839 MBSTRG(internal_encoding_set) = 1; in PHP_INI_MH()
843 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()
870 MBSTRG(filter_illegal_substchar) = c; in PHP_INI_MH()
871 MBSTRG(current_filter_illegal_substchar) = c; in PHP_INI_MH()
876 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_INI_MH()
877 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_INI_MH()
878 MBSTRG(filter_illegal_substchar) = '?'; in PHP_INI_MH()
879 MBSTRG(current_filter_illegal_substchar) = '?'; in PHP_INI_MH()
895 if (MBSTRG(encoding_translation)) { in PHP_INI_MH()
925 if (MBSTRG(http_output_conv_mimetypes)) { in PHP_INI_MH()
926 _php_mb_free_regex(MBSTRG(http_output_conv_mimetypes)); in PHP_INI_MH()
929 MBSTRG(http_output_conv_mimetypes) = re; in PHP_INI_MH()
968 if (!MBSTRG(internal_encoding_set)) { in PHP_INI_END()
973 if (!MBSTRG(http_output_set)) { in PHP_INI_END()
978 if (!MBSTRG(http_input_set)) { in PHP_INI_END()
1071 if (MBSTRG(encoding_translation)) { in PHP_MINIT_FUNCTION()
1122 MBSTRG(current_internal_encoding) = MBSTRG(internal_encoding); in PHP_RINIT_FUNCTION()
1123 MBSTRG(current_http_output_encoding) = MBSTRG(http_output_encoding); in PHP_RINIT_FUNCTION()
1124 MBSTRG(current_filter_illegal_mode) = MBSTRG(filter_illegal_mode); in PHP_RINIT_FUNCTION()
1125 MBSTRG(current_filter_illegal_substchar) = MBSTRG(filter_illegal_substchar); in PHP_RINIT_FUNCTION()
1127 MBSTRG(illegalchars) = 0; in PHP_RINIT_FUNCTION()
1134 zend_multibyte_set_internal_encoding((const zend_encoding *)MBSTRG(internal_encoding)); in PHP_RINIT_FUNCTION()
1143 if (MBSTRG(current_detect_order_list) != NULL) { in PHP_RSHUTDOWN_FUNCTION()
1144 efree(ZEND_VOIDP(MBSTRG(current_detect_order_list))); in PHP_RSHUTDOWN_FUNCTION()
1145 MBSTRG(current_detect_order_list) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1146 MBSTRG(current_detect_order_list_size) = 0; in PHP_RSHUTDOWN_FUNCTION()
1150 MBSTRG(http_input_identify) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1151 MBSTRG(http_input_identify_post) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1152 MBSTRG(http_input_identify_get) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1153 MBSTRG(http_input_identify_cookie) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1154 MBSTRG(http_input_identify_string) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1156 if (MBSTRG(last_used_encoding_name)) { in PHP_RSHUTDOWN_FUNCTION()
1157 zend_string_release(MBSTRG(last_used_encoding_name)); in PHP_RSHUTDOWN_FUNCTION()
1158 MBSTRG(last_used_encoding_name) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1161 MBSTRG(internal_encoding_set) = 0; in PHP_RSHUTDOWN_FUNCTION()
1162 MBSTRG(http_output_set) = 0; in PHP_RSHUTDOWN_FUNCTION()
1163 MBSTRG(http_input_set) = 0; in PHP_RSHUTDOWN_FUNCTION()
1165 MBSTRG(outconv_enabled) = false; in PHP_RSHUTDOWN_FUNCTION()
1166 MBSTRG(outconv_state) = 0; in PHP_RSHUTDOWN_FUNCTION()
1168 if (MBSTRG(all_encodings_list)) { in PHP_RSHUTDOWN_FUNCTION()
1169 GC_DELREF(MBSTRG(all_encodings_list)); in PHP_RSHUTDOWN_FUNCTION()
1170 zend_array_destroy(MBSTRG(all_encodings_list)); in PHP_RSHUTDOWN_FUNCTION()
1171 MBSTRG(all_encodings_list) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1188 …php_info_print_table_row(2, "HTTP input encoding translation", MBSTRG(encoding_translation) ? "ena… in PHP_MINFO_FUNCTION()
1219 RETVAL_STRING((char *)mbfl_no_language2name(MBSTRG(language))); in PHP_FUNCTION()
1247 ZEND_ASSERT(MBSTRG(current_internal_encoding)); in PHP_FUNCTION()
1248 RETURN_STRING(MBSTRG(current_internal_encoding)->name); in PHP_FUNCTION()
1255 MBSTRG(current_internal_encoding) = encoding; in PHP_FUNCTION()
1256 MBSTRG(internal_encoding_set) = 1; in PHP_FUNCTION()
1278 encoding = MBSTRG(http_input_identify); in PHP_FUNCTION()
1287 encoding = MBSTRG(http_input_identify_get); in PHP_FUNCTION()
1291 encoding = MBSTRG(http_input_identify_post); in PHP_FUNCTION()
1295 encoding = MBSTRG(http_input_identify_cookie); in PHP_FUNCTION()
1299 encoding = MBSTRG(http_input_identify_string); in PHP_FUNCTION()
1303 entry = MBSTRG(http_input_list); in PHP_FUNCTION()
1304 n = MBSTRG(http_input_list_size); in PHP_FUNCTION()
1312 entry = MBSTRG(http_input_list); in PHP_FUNCTION()
1313 n = MBSTRG(http_input_list_size); in PHP_FUNCTION()
1353 ZEND_ASSERT(MBSTRG(current_http_output_encoding)); in PHP_FUNCTION()
1354 RETURN_STRING(MBSTRG(current_http_output_encoding)->name); in PHP_FUNCTION()
1361 MBSTRG(http_output_set) = 1; in PHP_FUNCTION()
1362 MBSTRG(current_http_output_encoding) = encoding; in PHP_FUNCTION()
1382 size_t n = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
1383 const mbfl_encoding **entry = MBSTRG(current_detect_order_list); in PHP_FUNCTION()
1408 if (MBSTRG(current_detect_order_list)) { in PHP_FUNCTION()
1409 efree(ZEND_VOIDP(MBSTRG(current_detect_order_list))); in PHP_FUNCTION()
1411 MBSTRG(current_detect_order_list) = list; in PHP_FUNCTION()
1412 MBSTRG(current_detect_order_list_size) = size; in PHP_FUNCTION()
1450 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { in PHP_FUNCTION()
1453 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { in PHP_FUNCTION()
1456 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) { in PHP_FUNCTION()
1459 RETURN_LONG(MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
1464 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE; in PHP_FUNCTION()
1468 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG; in PHP_FUNCTION()
1472 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY; in PHP_FUNCTION()
1485 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_FUNCTION()
1486 MBSTRG(current_filter_illegal_substchar) = substitute_codepoint; in PHP_FUNCTION()
1541 info.to_encoding = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
1542 info.from_encodings = MBSTRG(http_input_list); in PHP_FUNCTION()
1543 info.num_from_encodings = MBSTRG(http_input_list_size); in PHP_FUNCTION()
1547 MBSTRG(http_input_identify) = detected; in PHP_FUNCTION()
1565 const mbfl_encoding *encoding = MBSTRG(current_http_output_encoding); in PHP_FUNCTION()
1575 …if (SG(sapi_headers).mimetype && _php_mb_match_regex(MBSTRG(http_output_conv_mimetypes), SG(sapi_h… in PHP_FUNCTION()
1598 MBSTRG(outconv_enabled) = true; in PHP_FUNCTION()
1606 if (!MBSTRG(outconv_enabled)) { in PHP_FUNCTION()
1611 …mb_convert_buf_init(&buf, ZSTR_LEN(str), MBSTRG(current_filter_illegal_substchar), MBSTRG(current_… in PHP_FUNCTION()
1619 …size_t out_len = MBSTRG(current_internal_encoding)->to_wchar(&in, &in_len, wchar_buf, 128, &MBSTRG in PHP_FUNCTION()
1624 MBSTRG(illegalchars) += buf.errors; in PHP_FUNCTION()
1628 MBSTRG(outconv_enabled) = false; in PHP_FUNCTION()
1629 MBSTRG(outconv_state) = 0; in PHP_FUNCTION()
1725 …mb_convert_buf_init(&buf, split_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filt… in PHP_FUNCTION()
2097 …mb_convert_buf_init(&buf, MIN(len, in_len - from), MBSTRG(current_filter_illegal_substchar), MBSTR… in mb_get_substr_slow()
2562 …mb_convert_buf_init(&buf, width, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_i… in mb_trim_string()
2701 …ed char*)input, length, from_encoding, to_encoding, MBSTRG(current_filter_illegal_substchar), MBST… in php_mb_convert_encoding_ex()
2702 MBSTRG(illegalchars) += num_errors; in php_mb_convert_encoding_ex()
2716 …oding((unsigned char*)input, length, from_encodings, num_from_encodings, MBSTRG(strict_detection),… in php_mb_convert_encoding()
2860 from_encodings = &MBSTRG(current_internal_encoding); in PHP_FUNCTION()
2896 …nicode_convert_case(case_mode, str, str_len, enc, enc, MBSTRG(current_filter_illegal_mode), MBSTRG in mbstring_convert_case()
3421 if (encoding_ht == MBSTRG(all_encodings_list)) { in PHP_FUNCTION()
3432 …elist = duplicate_elist(MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size)); in PHP_FUNCTION()
3433 size = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
3449 strict = MBSTRG(strict_detection); in PHP_FUNCTION()
3473 if (MBSTRG(all_encodings_list) == NULL) { in PHP_FUNCTION()
3484 MBSTRG(all_encodings_list) = array; in PHP_FUNCTION()
3487 GC_ADDREF(MBSTRG(all_encodings_list)); in PHP_FUNCTION()
3488 RETURN_ARR(MBSTRG(all_encodings_list)); in PHP_FUNCTION()
3529 …mb_convert_buf_init(&buf, in_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_… in jp_kana_convert()
3814 from_encoding = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
3820 if (from_enc_ht == MBSTRG(all_encodings_list)) { in PHP_FUNCTION()
3862 …from_encoding = mb_guess_encoding_for_strings(val_list, len_list, num, elist, elistsz, MBSTRG(stri… in PHP_FUNCTION()
3952 …mb_convert_buf_init(&buf, in_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_… in html_numeric_entity_encode()
4069 …mb_convert_buf_init(&buf, in_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_… in html_numeric_entity_decode()
4459 lang = mbfl_no2language(MBSTRG(language)); in PHP_FUNCTION()
4580 const mbfl_encoding *enc = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
4582 …TR_VAL(subject), ZSTR_LEN(subject), MBSTRG(current_detect_order_list), MBSTRG(current_detect_order… in PHP_FUNCTION()
4590 const mbfl_encoding *msg_enc = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
4592 …nsigned char*)message, message_len, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order… in PHP_FUNCTION()
4699 const mbfl_language *lang = mbfl_no2language(MBSTRG(language)); in PHP_FUNCTION()
4710 if (MBSTRG(current_internal_encoding)) { in PHP_FUNCTION()
4711 …add_assoc_string(return_value, "internal_encoding", (char *)MBSTRG(current_internal_encoding)->nam… in PHP_FUNCTION()
4713 if (MBSTRG(http_input_identify)) { in PHP_FUNCTION()
4714 add_assoc_string(return_value, "http_input", (char *)MBSTRG(http_input_identify)->name); in PHP_FUNCTION()
4716 if (MBSTRG(current_http_output_encoding)) { in PHP_FUNCTION()
4717 … add_assoc_string(return_value, "http_output", (char *)MBSTRG(current_http_output_encoding)->name); in PHP_FUNCTION()
4733 add_assoc_long(return_value, "illegal_chars", MBSTRG(illegalchars)); in PHP_FUNCTION()
4735 if (MBSTRG(encoding_translation)) { in PHP_FUNCTION()
4741 name = (char *)mbfl_no_language2name(MBSTRG(language)); in PHP_FUNCTION()
4745 n = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
4746 entry = MBSTRG(current_detect_order_list); in PHP_FUNCTION()
4756 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { in PHP_FUNCTION()
4758 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { in PHP_FUNCTION()
4760 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) { in PHP_FUNCTION()
4763 add_assoc_long(return_value, "substitute_character", MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
4765 if (MBSTRG(strict_detection)) { in PHP_FUNCTION()
4771 ZEND_ASSERT(MBSTRG(current_internal_encoding)); in PHP_FUNCTION()
4772 RETURN_STRING((char *)MBSTRG(current_internal_encoding)->name); in PHP_FUNCTION()
4774 if (MBSTRG(http_input_identify)) { in PHP_FUNCTION()
4775 RETURN_STRING((char *)MBSTRG(http_input_identify)->name); in PHP_FUNCTION()
4779 ZEND_ASSERT(MBSTRG(current_http_output_encoding)); in PHP_FUNCTION()
4780 RETURN_STRING((char *)MBSTRG(current_http_output_encoding)->name); in PHP_FUNCTION()
4799 RETURN_LONG(MBSTRG(illegalchars)); in PHP_FUNCTION()
4801 if (MBSTRG(encoding_translation)) { in PHP_FUNCTION()
4807 name = (char *)mbfl_no_language2name(MBSTRG(language)); in PHP_FUNCTION()
4811 n = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
4812 entry = MBSTRG(current_detect_order_list); in PHP_FUNCTION()
4822 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { in PHP_FUNCTION()
4824 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { in PHP_FUNCTION()
4826 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) { in PHP_FUNCTION()
4829 RETURN_LONG(MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
4832 if (MBSTRG(strict_detection)) { in PHP_FUNCTION()
5624 RETURN_BOOL(MBSTRG(illegalchars) == 0); in PHP_FUNCTION()
5750 long orig_illegalchars = MBSTRG(illegalchars); in php_mb_chr()
5751 MBSTRG(illegalchars) = 0; in php_mb_chr()
5754 if (MBSTRG(illegalchars) != 0) { in php_mb_chr()
5759 MBSTRG(illegalchars) = orig_illegalchars; in php_mb_chr()
5941 if (MBSTRG(detect_order_list) && MBSTRG(detect_order_list_size)) { in php_mb_populate_current_detect_order_list()
5942 nentries = MBSTRG(detect_order_list_size); in php_mb_populate_current_detect_order_list()
5944 memcpy(ZEND_VOIDP(entry), MBSTRG(detect_order_list), sizeof(mbfl_encoding*) * nentries); in php_mb_populate_current_detect_order_list()
5946 const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); in php_mb_populate_current_detect_order_list()
5948 nentries = MBSTRG(default_detect_order_list_size); in php_mb_populate_current_detect_order_list()
5954 MBSTRG(current_detect_order_list) = entry; in php_mb_populate_current_detect_order_list()
5955 MBSTRG(current_detect_order_list_size) = nentries; in php_mb_populate_current_detect_order_list()
5962 return MBSTRG(encoding_translation); in php_mb_encoding_translation()
6038 *list = (const zend_encoding **)MBSTRG(http_input_list); in php_mb_gpc_get_detect_order()
6039 *list_size = MBSTRG(http_input_list_size); in php_mb_gpc_get_detect_order()
6045 MBSTRG(http_input_identify) = (const mbfl_encoding*)encoding; in php_mb_gpc_set_input_encoding()
6448 const mbfl_language *lang = mbfl_no2language(MBSTRG(language)); in PHP_FUNCTION()
6466 …RETURN_STR(mb_mime_header_encode(str, MBSTRG(current_internal_encoding), charset, base64, linefeed… in PHP_FUNCTION()
6698 RETURN_STR(mb_mime_header_decode(str, MBSTRG(current_internal_encoding))); in PHP_FUNCTION()