Lines Matching refs:MBSTRG

239 		zend_string *last_encoding_name = MBSTRG(last_used_encoding_name);  in php_mb_get_encoding()
242 return MBSTRG(last_used_encoding); in php_mb_get_encoding()
264 MBSTRG(last_used_encoding_name) = zend_string_copy(encoding_name); in php_mb_get_encoding()
265 MBSTRG(last_used_encoding) = encoding; in php_mb_get_encoding()
268 return MBSTRG(current_internal_encoding); in php_mb_get_encoding()
315 size = 1 + count_commas(tmpstr, endp) + MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_list()
337 const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); in php_mb_parse_encoding_list()
338 const size_t identify_list_size = MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_list()
385 size_t size = zend_hash_num_elements(target_hash) + MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_array()
400 const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); in php_mb_parse_encoding_array()
401 const size_t identify_list_size = MBSTRG(default_detect_order_list_size); in php_mb_parse_encoding_array()
450 list = (const zend_encoding**)MBSTRG(current_detect_order_list); in php_mb_zend_encoding_detector()
451 list_size = MBSTRG(current_detect_order_list_size); in php_mb_zend_encoding_detector()
464 …*)encoding_from, (const mbfl_encoding*)encoding_to, MBSTRG(current_filter_illegal_substchar), MBST… in php_mb_zend_encoding_converter()
484 return (const zend_encoding *)MBSTRG(internal_encoding); in php_mb_zend_internal_encoding_getter()
489 MBSTRG(internal_encoding) = (const mbfl_encoding *)encoding; in php_mb_zend_internal_encoding_setter()
693 MBSTRG(language) = mbfl_no_language_neutral; in PHP_INI_MH()
696 MBSTRG(language) = no_language; in PHP_INI_MH()
697 …php_mb_nls_get_default_detect_order_list(no_language, &MBSTRG(default_detect_order_list), &MBSTRG(… in PHP_INI_MH()
709 if (MBSTRG(detect_order_list)) { in PHP_INI_MH()
710 pefree(ZEND_VOIDP(MBSTRG(detect_order_list)), 1); in PHP_INI_MH()
712 MBSTRG(detect_order_list) = NULL; in PHP_INI_MH()
713 MBSTRG(detect_order_list_size) = 0; in PHP_INI_MH()
721 if (MBSTRG(detect_order_list)) { in PHP_INI_MH()
722 pefree(ZEND_VOIDP(MBSTRG(detect_order_list)), 1); in PHP_INI_MH()
724 MBSTRG(detect_order_list) = list; in PHP_INI_MH()
725 MBSTRG(detect_order_list_size) = size; in PHP_INI_MH()
740 if (MBSTRG(http_input_list)) { in _php_mb_ini_mbstring_http_input_set()
741 pefree(ZEND_VOIDP(MBSTRG(http_input_list)), 1); in _php_mb_ini_mbstring_http_input_set()
743 MBSTRG(http_input_list) = list; in _php_mb_ini_mbstring_http_input_set()
744 MBSTRG(http_input_list_size) = size; in _php_mb_ini_mbstring_http_input_set()
757 MBSTRG(http_input_set) = 0; in PHP_INI_MH()
762 MBSTRG(http_input_set) = 1; in PHP_INI_MH()
773 MBSTRG(http_output_encoding) = encoding; in _php_mb_ini_mbstring_http_output_set()
774 MBSTRG(current_http_output_encoding) = encoding; in _php_mb_ini_mbstring_http_output_set()
786 MBSTRG(http_output_set) = 0; in PHP_INI_MH()
791 MBSTRG(http_output_set) = 1; in PHP_INI_MH()
808 MBSTRG(internal_encoding) = encoding; in _php_mb_ini_mbstring_internal_encoding_set()
809 MBSTRG(current_internal_encoding) = encoding; in _php_mb_ini_mbstring_internal_encoding_set()
837 MBSTRG(internal_encoding_set) = 1; in PHP_INI_MH()
841 MBSTRG(internal_encoding_set) = 0; in PHP_INI_MH()
855 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE; in PHP_INI_MH()
856 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE; in PHP_INI_MH()
858 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG; in PHP_INI_MH()
859 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG; in PHP_INI_MH()
861 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY; in PHP_INI_MH()
862 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY; in PHP_INI_MH()
864 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_INI_MH()
865 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_INI_MH()
869 MBSTRG(filter_illegal_substchar) = c; in PHP_INI_MH()
870 MBSTRG(current_filter_illegal_substchar) = c; in PHP_INI_MH()
875 MBSTRG(filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_INI_MH()
876 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_INI_MH()
877 MBSTRG(filter_illegal_substchar) = '?'; in PHP_INI_MH()
878 MBSTRG(current_filter_illegal_substchar) = '?'; in PHP_INI_MH()
894 if (MBSTRG(encoding_translation)) { in PHP_INI_MH()
924 if (MBSTRG(http_output_conv_mimetypes)) { in PHP_INI_MH()
925 _php_mb_free_regex(MBSTRG(http_output_conv_mimetypes)); in PHP_INI_MH()
928 MBSTRG(http_output_conv_mimetypes) = re; in PHP_INI_MH()
967 if (!MBSTRG(internal_encoding_set)) { in PHP_INI_END()
972 if (!MBSTRG(http_output_set)) { in PHP_INI_END()
977 if (!MBSTRG(http_input_set)) { in PHP_INI_END()
1070 if (MBSTRG(encoding_translation)) { in PHP_MINIT_FUNCTION()
1121 MBSTRG(current_internal_encoding) = MBSTRG(internal_encoding); in PHP_RINIT_FUNCTION()
1122 MBSTRG(current_http_output_encoding) = MBSTRG(http_output_encoding); in PHP_RINIT_FUNCTION()
1123 MBSTRG(current_filter_illegal_mode) = MBSTRG(filter_illegal_mode); in PHP_RINIT_FUNCTION()
1124 MBSTRG(current_filter_illegal_substchar) = MBSTRG(filter_illegal_substchar); in PHP_RINIT_FUNCTION()
1126 MBSTRG(illegalchars) = 0; in PHP_RINIT_FUNCTION()
1133 zend_multibyte_set_internal_encoding((const zend_encoding *)MBSTRG(internal_encoding)); in PHP_RINIT_FUNCTION()
1142 if (MBSTRG(current_detect_order_list) != NULL) { in PHP_RSHUTDOWN_FUNCTION()
1143 efree(ZEND_VOIDP(MBSTRG(current_detect_order_list))); in PHP_RSHUTDOWN_FUNCTION()
1144 MBSTRG(current_detect_order_list) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1145 MBSTRG(current_detect_order_list_size) = 0; 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()
1164 MBSTRG(outconv_enabled) = false; in PHP_RSHUTDOWN_FUNCTION()
1165 MBSTRG(outconv_state) = 0; in PHP_RSHUTDOWN_FUNCTION()
1167 if (MBSTRG(all_encodings_list)) { in PHP_RSHUTDOWN_FUNCTION()
1168 GC_DELREF(MBSTRG(all_encodings_list)); in PHP_RSHUTDOWN_FUNCTION()
1169 zend_array_destroy(MBSTRG(all_encodings_list)); in PHP_RSHUTDOWN_FUNCTION()
1170 MBSTRG(all_encodings_list) = NULL; in PHP_RSHUTDOWN_FUNCTION()
1187 …php_info_print_table_row(2, "HTTP input encoding translation", MBSTRG(encoding_translation) ? "ena… in PHP_MINFO_FUNCTION()
1218 RETVAL_STRING((char *)mbfl_no_language2name(MBSTRG(language))); in PHP_FUNCTION()
1246 ZEND_ASSERT(MBSTRG(current_internal_encoding)); in PHP_FUNCTION()
1247 RETURN_STRING(MBSTRG(current_internal_encoding)->name); in PHP_FUNCTION()
1254 MBSTRG(current_internal_encoding) = encoding; in PHP_FUNCTION()
1255 MBSTRG(internal_encoding_set) = 1; in PHP_FUNCTION()
1277 encoding = MBSTRG(http_input_identify); in PHP_FUNCTION()
1282 encoding = MBSTRG(http_input_identify_get); in PHP_FUNCTION()
1286 encoding = MBSTRG(http_input_identify_post); in PHP_FUNCTION()
1290 encoding = MBSTRG(http_input_identify_cookie); in PHP_FUNCTION()
1294 encoding = MBSTRG(http_input_identify_string); in PHP_FUNCTION()
1298 entry = MBSTRG(http_input_list); in PHP_FUNCTION()
1299 n = MBSTRG(http_input_list_size); in PHP_FUNCTION()
1307 entry = MBSTRG(http_input_list); in PHP_FUNCTION()
1308 n = MBSTRG(http_input_list_size); in PHP_FUNCTION()
1348 ZEND_ASSERT(MBSTRG(current_http_output_encoding)); in PHP_FUNCTION()
1349 RETURN_STRING(MBSTRG(current_http_output_encoding)->name); in PHP_FUNCTION()
1356 MBSTRG(http_output_set) = 1; in PHP_FUNCTION()
1357 MBSTRG(current_http_output_encoding) = encoding; in PHP_FUNCTION()
1377 size_t n = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
1378 const mbfl_encoding **entry = MBSTRG(current_detect_order_list); in PHP_FUNCTION()
1403 if (MBSTRG(current_detect_order_list)) { in PHP_FUNCTION()
1404 efree(ZEND_VOIDP(MBSTRG(current_detect_order_list))); in PHP_FUNCTION()
1406 MBSTRG(current_detect_order_list) = list; in PHP_FUNCTION()
1407 MBSTRG(current_detect_order_list_size) = size; in PHP_FUNCTION()
1445 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { in PHP_FUNCTION()
1448 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { in PHP_FUNCTION()
1451 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) { in PHP_FUNCTION()
1454 RETURN_LONG(MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
1459 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE; in PHP_FUNCTION()
1463 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG; in PHP_FUNCTION()
1467 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY; in PHP_FUNCTION()
1480 MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; in PHP_FUNCTION()
1481 MBSTRG(current_filter_illegal_substchar) = substitute_codepoint; in PHP_FUNCTION()
1536 info.to_encoding = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
1537 info.from_encodings = MBSTRG(http_input_list); in PHP_FUNCTION()
1538 info.num_from_encodings = MBSTRG(http_input_list_size); in PHP_FUNCTION()
1542 MBSTRG(http_input_identify) = detected; in PHP_FUNCTION()
1560 const mbfl_encoding *encoding = MBSTRG(current_http_output_encoding); in PHP_FUNCTION()
1570 …if (SG(sapi_headers).mimetype && _php_mb_match_regex(MBSTRG(http_output_conv_mimetypes), SG(sapi_h… in PHP_FUNCTION()
1593 MBSTRG(outconv_enabled) = true; in PHP_FUNCTION()
1601 if (!MBSTRG(outconv_enabled)) { in PHP_FUNCTION()
1606 …mb_convert_buf_init(&buf, ZSTR_LEN(str), MBSTRG(current_filter_illegal_substchar), MBSTRG(current_… in PHP_FUNCTION()
1614 …size_t out_len = MBSTRG(current_internal_encoding)->to_wchar(&in, &in_len, wchar_buf, 128, &MBSTRG in PHP_FUNCTION()
1619 MBSTRG(illegalchars) += buf.errors; in PHP_FUNCTION()
1623 MBSTRG(outconv_enabled) = false; in PHP_FUNCTION()
1624 MBSTRG(outconv_state) = 0; in PHP_FUNCTION()
1720 …mb_convert_buf_init(&buf, split_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filt… in PHP_FUNCTION()
2092 …mb_convert_buf_init(&buf, MIN(len, in_len - from), MBSTRG(current_filter_illegal_substchar), MBSTR… in mb_get_substr_slow()
2516 …mb_convert_buf_init(&buf, width, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_i… in mb_trim_string()
2654 …ed char*)input, length, from_encoding, to_encoding, MBSTRG(current_filter_illegal_substchar), MBST… in php_mb_convert_encoding_ex()
2655 MBSTRG(illegalchars) += num_errors; in php_mb_convert_encoding_ex()
2669 …oding((unsigned char*)input, length, from_encodings, num_from_encodings, MBSTRG(strict_detection),… in php_mb_convert_encoding()
2813 from_encodings = &MBSTRG(current_internal_encoding); in PHP_FUNCTION()
2849 …nicode_convert_case(case_mode, str, str_len, enc, enc, MBSTRG(current_filter_illegal_mode), MBSTRG in mbstring_convert_case()
3165 if (encoding_ht == MBSTRG(all_encodings_list)) { in PHP_FUNCTION()
3176 …elist = duplicate_elist(MBSTRG(current_detect_order_list), MBSTRG(current_detect_order_list_size)); in PHP_FUNCTION()
3177 size = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
3193 strict = MBSTRG(strict_detection); in PHP_FUNCTION()
3217 if (MBSTRG(all_encodings_list) == NULL) { in PHP_FUNCTION()
3228 MBSTRG(all_encodings_list) = array; in PHP_FUNCTION()
3231 GC_ADDREF(MBSTRG(all_encodings_list)); in PHP_FUNCTION()
3232 RETURN_ARR(MBSTRG(all_encodings_list)); in PHP_FUNCTION()
3273 …mb_convert_buf_init(&buf, in_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_… in jp_kana_convert()
3558 from_encoding = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
3564 if (from_enc_ht == MBSTRG(all_encodings_list)) { in PHP_FUNCTION()
3606 …from_encoding = mb_guess_encoding_for_strings(val_list, len_list, num, elist, elistsz, MBSTRG(stri… in PHP_FUNCTION()
3690 …mb_convert_buf_init(&buf, in_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_… in html_numeric_entity_encode()
3807 …mb_convert_buf_init(&buf, in_len, MBSTRG(current_filter_illegal_substchar), MBSTRG(current_filter_… in html_numeric_entity_decode()
4198 lang = mbfl_no2language(MBSTRG(language)); in PHP_FUNCTION()
4319 const mbfl_encoding *enc = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
4321 …TR_VAL(subject), ZSTR_LEN(subject), MBSTRG(current_detect_order_list), MBSTRG(current_detect_order… in PHP_FUNCTION()
4329 const mbfl_encoding *msg_enc = MBSTRG(current_internal_encoding); in PHP_FUNCTION()
4331 …nsigned char*)message, message_len, MBSTRG(current_detect_order_list), MBSTRG(current_detect_order… in PHP_FUNCTION()
4436 const mbfl_language *lang = mbfl_no2language(MBSTRG(language)); in PHP_FUNCTION()
4446 if (MBSTRG(current_internal_encoding)) { in PHP_FUNCTION()
4447 …add_assoc_string(return_value, "internal_encoding", (char *)MBSTRG(current_internal_encoding)->nam… in PHP_FUNCTION()
4449 if (MBSTRG(http_input_identify)) { in PHP_FUNCTION()
4450 add_assoc_string(return_value, "http_input", (char *)MBSTRG(http_input_identify)->name); in PHP_FUNCTION()
4452 if (MBSTRG(current_http_output_encoding)) { in PHP_FUNCTION()
4453 … add_assoc_string(return_value, "http_output", (char *)MBSTRG(current_http_output_encoding)->name); in PHP_FUNCTION()
4469 add_assoc_long(return_value, "illegal_chars", MBSTRG(illegalchars)); in PHP_FUNCTION()
4470 if (MBSTRG(encoding_translation)) { in PHP_FUNCTION()
4475 if ((name = (char *)mbfl_no_language2name(MBSTRG(language))) != NULL) { in PHP_FUNCTION()
4478 n = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
4479 entry = MBSTRG(current_detect_order_list); in PHP_FUNCTION()
4489 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { in PHP_FUNCTION()
4491 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { in PHP_FUNCTION()
4493 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) { in PHP_FUNCTION()
4496 add_assoc_long(return_value, "substitute_character", MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
4498 if (MBSTRG(strict_detection)) { in PHP_FUNCTION()
4504 if (MBSTRG(current_internal_encoding)) { in PHP_FUNCTION()
4505 RETVAL_STRING((char *)MBSTRG(current_internal_encoding)->name); in PHP_FUNCTION()
4508 if (MBSTRG(http_input_identify)) { in PHP_FUNCTION()
4509 RETVAL_STRING((char *)MBSTRG(http_input_identify)->name); in PHP_FUNCTION()
4512 if (MBSTRG(current_http_output_encoding)) { in PHP_FUNCTION()
4513 RETVAL_STRING((char *)MBSTRG(current_http_output_encoding)->name); in PHP_FUNCTION()
4532 RETVAL_LONG(MBSTRG(illegalchars)); in PHP_FUNCTION()
4534 if (MBSTRG(encoding_translation)) { in PHP_FUNCTION()
4540 if ((name = (char *)mbfl_no_language2name(MBSTRG(language))) != NULL) { in PHP_FUNCTION()
4544 n = MBSTRG(current_detect_order_list_size); in PHP_FUNCTION()
4545 entry = MBSTRG(current_detect_order_list); in PHP_FUNCTION()
4555 if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { in PHP_FUNCTION()
4557 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG) { in PHP_FUNCTION()
4559 } else if (MBSTRG(current_filter_illegal_mode) == MBFL_OUTPUTFILTER_ILLEGAL_MODE_ENTITY) { in PHP_FUNCTION()
4562 RETVAL_LONG(MBSTRG(current_filter_illegal_substchar)); in PHP_FUNCTION()
4565 if (MBSTRG(strict_detection)) { in PHP_FUNCTION()
5357 RETURN_BOOL(MBSTRG(illegalchars) == 0); in PHP_FUNCTION()
5483 long orig_illegalchars = MBSTRG(illegalchars); in php_mb_chr()
5484 MBSTRG(illegalchars) = 0; in php_mb_chr()
5487 if (MBSTRG(illegalchars) != 0) { in php_mb_chr()
5492 MBSTRG(illegalchars) = orig_illegalchars; in php_mb_chr()
5674 if (MBSTRG(detect_order_list) && MBSTRG(detect_order_list_size)) { in php_mb_populate_current_detect_order_list()
5675 nentries = MBSTRG(detect_order_list_size); in php_mb_populate_current_detect_order_list()
5677 memcpy(ZEND_VOIDP(entry), MBSTRG(detect_order_list), sizeof(mbfl_encoding*) * nentries); in php_mb_populate_current_detect_order_list()
5679 const enum mbfl_no_encoding *src = MBSTRG(default_detect_order_list); in php_mb_populate_current_detect_order_list()
5681 nentries = MBSTRG(default_detect_order_list_size); in php_mb_populate_current_detect_order_list()
5687 MBSTRG(current_detect_order_list) = entry; in php_mb_populate_current_detect_order_list()
5688 MBSTRG(current_detect_order_list_size) = nentries; in php_mb_populate_current_detect_order_list()
5695 return MBSTRG(encoding_translation); in php_mb_encoding_translation()
5771 *list = (const zend_encoding **)MBSTRG(http_input_list); in php_mb_gpc_get_detect_order()
5772 *list_size = MBSTRG(http_input_list_size); in php_mb_gpc_get_detect_order()
5778 MBSTRG(http_input_identify) = (const mbfl_encoding*)encoding; in php_mb_gpc_set_input_encoding()
6181 const mbfl_language *lang = mbfl_no2language(MBSTRG(language)); in PHP_FUNCTION()
6199 …RETURN_STR(mb_mime_header_encode(str, MBSTRG(current_internal_encoding), charset, base64, linefeed… in PHP_FUNCTION()
6431 RETURN_STR(mb_mime_header_decode(str, MBSTRG(current_internal_encoding))); in PHP_FUNCTION()