Home
last modified time | relevance | path

Searched refs:mb_convert_encoding (Results 1 – 25 of 70) sorted by relevance

123

/PHP-8.2/ext/mbstring/tests/
H A Dbug48645.phpt2 Bug #48645 (mb_convert_encoding() doesn't understand hexadecimal html-entities)
7 var_dump(bin2hex(mb_convert_encoding("�", "UTF-8", "HTML-ENTITIES")));
8 var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
9 var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
10 var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
11 var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
12 var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
13 var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
14 var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
15 var_dump(bin2hex(mb_convert_encoding("", "UTF-8", "HTML-ENTITIES")));
[all …]
H A Dpictogram1.phpt10 var_dump(bin2hex(mb_convert_encoding("\xf8\x9f", "UCS-4BE", "SJIS-Mobile#DOCOMO")));
11 var_dump(bin2hex(mb_convert_encoding("\xf6\x60", "UCS-4BE", "SJIS-Mobile#KDDI")));
12 var_dump(bin2hex(mb_convert_encoding("\xf9\x8b", "UCS-4BE", "SJIS-Mobile#SOFTBANK")));
14 var_dump(bin2hex(mb_convert_encoding("\xf9\xe6", "UCS-4BE", "SJIS-Mobile#DOCOMO")));
15 var_dump(bin2hex(mb_convert_encoding("\xf6\xec", "UCS-4BE", "SJIS-Mobile#KDDI")));
16 var_dump(bin2hex(mb_convert_encoding("\xf7\x50", "UCS-4BE", "SJIS-Mobile#SOFTBANK")));
18 var_dump(bin2hex(mb_convert_encoding("\xf9\x85", "UCS-4BE", "SJIS-Mobile#DOCOMO")));
19 var_dump(bin2hex(mb_convert_encoding("\xf4\x89", "UCS-4BE", "SJIS-Mobile#KDDI")));
20 var_dump(bin2hex(mb_convert_encoding("\xf7\xb0", "UCS-4BE", "SJIS-Mobile#SOFTBANK")));
22 var_dump(bin2hex(mb_convert_encoding("\xf3\xd2", "UCS-4BE", "SJIS-Mobile#KDDI")));
[all …]
H A Dmb_convert_encoding_array2.phpt2 Test mb_convert_encoding() function : Circular references
8 * Test basic functionality of mb_convert_encoding()
11 echo "*** Testing mb_convert_encoding() : Circular references ***\n";
47 var_dump(base64_encode_array(mb_convert_encoding($sjis_string, 'JIS', 'SJIS')));
49 var_dump(base64_encode_array(mb_convert_encoding($utf8_string, 'JIS', 'UTF-8')));
56 var_dump(base64_encode_array(mb_convert_encoding($jis_string, 'EUC-JP', 'JIS')));
63 var_dump(base64_encode_array(mb_convert_encoding($jis_string, 'SJIS', 'JIS')));
65 var_dump(base64_encode_array(mb_convert_encoding($utf8_string, 'SJIS', 'UTF-8')));
71 var_dump(base64_encode_array(mb_convert_encoding($sjis_string, 'UTF-8', 'SJIS')));
72 var_dump(base64_encode_array(mb_convert_encoding($jis_string, 'UTF-8', 'JIS')));
[all …]
H A Dmb_convert_encoding_stateful.phpt2 mb_convert_encoding() with stateful encodings
11 echo bin2hex(mb_convert_encoding(pack("H*", "1b24401b24402121"), "UTF-8", "ISO-2022-JP")), "\n";
12 echo bin2hex(mb_convert_encoding(pack("H*", "1b24421b24422121"), "UTF-8", "ISO-2022-JP")), "\n";
13 echo bin2hex(mb_convert_encoding(pack("H*", "1b28421b284261626364"), "UTF-8", "ISO-2022-JP")), "\n";
14 echo bin2hex(mb_convert_encoding(pack("H*", "1b284a1b284a61626364"), "UTF-8", "ISO-2022-JP")), "\n";
15 echo bin2hex(mb_convert_encoding(pack("H*", "1b24401b284261626364"), "UTF-8", "ISO-2022-JP")), "\n";
16 echo bin2hex(mb_convert_encoding(pack("H*", "1b24401b284a61626364"), "UTF-8", "ISO-2022-JP")), "\n";
17 echo bin2hex(mb_convert_encoding(pack("H*", "1b24421b284261626364"), "UTF-8", "ISO-2022-JP")), "\n";
18 echo bin2hex(mb_convert_encoding(pack("H*", "1b24421b284a61626364"), "UTF-8", "ISO-2022-JP")), "\n";
20 echo bin2hex(mb_convert_encoding(pack("H*", "1b2429430e0f61626364"), "UTF-8", "ISO-2022-KR")), "\n";
[all …]
H A Dmb_convert_encoding_basic.phpt2 Test mb_convert_encoding() function : basic functionality
8 * Test basic functionality of mb_convert_encoding()
11 echo "*** Testing mb_convert_encoding() : basic functionality ***\n";
23 var_dump(base64_encode(mb_convert_encoding($sjis_string, 'JIS', 'SJIS')));
24 var_dump(base64_encode(mb_convert_encoding($euc_jp_string, 'JIS', 'EUC-JP')));
25 var_dump(base64_encode(mb_convert_encoding($utf8_string, 'JIS', 'UTF-8')));
31 var_dump(base64_encode(mb_convert_encoding($sjis_string, 'EUC-JP', 'SJIS')));
32 var_dump(base64_encode(mb_convert_encoding($jis_string, 'EUC-JP', 'JIS')));
39 var_dump(base64_encode(mb_convert_encoding($jis_string, 'SJIS', 'JIS')));
48 var_dump(base64_encode(mb_convert_encoding($jis_string, 'UTF-8', 'JIS')));
[all …]
H A Dmb_convert_encoding.phpt2 mb_convert_encoding()
24 $s = mb_convert_encoding($euc_jp, 'SJIS', 'EUC-JP');
27 $s = mb_convert_encoding($euc_jp, 'JIS', 'EUC-JP');
39 $s = mb_convert_encoding($s, 'SJIS', $a);
43 $s = mb_convert_encoding($s, 'JIS', $a);
55 $s = mb_convert_encoding($s, 'SJIS', $a);
59 $s = mb_convert_encoding($s, 'JIS', $a);
73 $s = mb_convert_encoding($s, 'SJIS', 'auto');
77 $s = mb_convert_encoding($s, 'JIS', 'auto');
82 $s = mb_convert_encoding(1234, 'EUC-JP');
[all …]
H A Dbug79149.phpt2 Bug #79149 (SEGV in mb_convert_encoding with non-string encodings)
8 var_dump(mb_convert_encoding("", "UTF-8", [0]));
13 var_dump(mb_convert_encoding('foo', 'UTF-8', array(['bar'], ['baz'])));
18 var_dump(mb_convert_encoding('foo', 'UTF-8', array("foo\0bar")));
25 mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "0"
28 mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "Array"
29 mb_convert_encoding(): Argument #3 ($from_encoding) contains invalid encoding "foo"
H A Dmb_convert_encoding_array.phpt2 Test mb_convert_encoding() function : array functionality
8 * Test basic functionality of mb_convert_encoding()
11 echo "*** Testing mb_convert_encoding() : array functionality ***\n";
35 var_dump(base64_encode_array(mb_convert_encoding($sjis_string, 'JIS', 'SJIS')));
37 var_dump(base64_encode_array(mb_convert_encoding($utf8_string, 'JIS', 'UTF-8')));
43 var_dump(base64_encode_array(mb_convert_encoding($sjis_string, 'EUC-JP', 'SJIS')));
44 var_dump(base64_encode_array(mb_convert_encoding($jis_string, 'EUC-JP', 'JIS')));
51 var_dump(base64_encode_array(mb_convert_encoding($jis_string, 'SJIS', 'JIS')));
53 var_dump(base64_encode_array(mb_convert_encoding($utf8_string, 'SJIS', 'UTF-8')));
60 var_dump(base64_encode_array(mb_convert_encoding($jis_string, 'UTF-8', 'JIS')));
[all …]
H A Dmb_convert_encoding_empty_encoding_list.phpt2 Test mb_convert_encoding() function : empty encoding list
11 var_dump( mb_convert_encoding($string, 'UTF-8', ''));
16 var_dump( mb_convert_encoding($string, 'UTF-8', []));
23 mb_convert_encoding(): Argument #3 ($from_encoding) must specify at least one encoding
24 mb_convert_encoding(): Argument #3 ($from_encoding) must specify at least one encoding
H A Dbase64_encoding.phpt12 $converted = mb_convert_encoding($raw, 'Base64', '8bit');
15 $converted = mb_convert_encoding($base64, '8bit', 'Base64');
34 Deprecated: mb_convert_encoding(): Handling Base64 via mbstring is deprecated; use base64_encode/ba…
36 Deprecated: mb_convert_encoding(): Handling Base64 via mbstring is deprecated; use base64_encode/ba…
38 Deprecated: mb_convert_encoding(): Handling Base64 via mbstring is deprecated; use base64_encode/ba…
40 Deprecated: mb_convert_encoding(): Handling Base64 via mbstring is deprecated; use base64_encode/ba…
42 Deprecated: mb_convert_encoding(): Handling Base64 via mbstring is deprecated; use base64_encode/ba…
44 Deprecated: mb_convert_encoding(): Handling Base64 via mbstring is deprecated; use base64_encode/ba…
46 Deprecated: mb_convert_encoding(): Handling Base64 via mbstring is deprecated; use base64_encode/ba…
48 Deprecated: mb_convert_encoding(): Handling Base64 via mbstring is deprecated; use base64_encode/ba…
[all …]
H A Dgh10627.phpt2 GH-10627 (mb_convert_encoding crashes PHP on Windows)
10 var_dump(mb_convert_encoding($data, 'UTF-8', 'auto'));
12 var_dump(mb_convert_encoding($data, 'UTF-8', 'auto'));
16 Warning: mb_convert_encoding(): Unable to detect character encoding in %s on line %d
22 Warning: mb_convert_encoding(): Unable to detect character encoding in %s on line %d
H A Dbug49528.phpt7 var_dump(bin2hex(mb_convert_encoding("\xff\xfe\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
8 var_dump(bin2hex(mb_convert_encoding("\xfe\xff\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
9 var_dump(bin2hex(mb_convert_encoding("\xff\xfe\xff\xfe\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
10 var_dump(bin2hex(mb_convert_encoding("\xff\xfe\xfe\xff\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
11 var_dump(bin2hex(mb_convert_encoding("\xfe\xff\xff\xfe\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
12 var_dump(bin2hex(mb_convert_encoding("\xfe\xff\xfe\xff\x01\x02\x03\x04", "UCS-2BE", "UTF-16")));
H A Dbug69086.phpt2 Request #69086 (enhancement for mb_convert_encoding)
8 var_dump("?" === mb_convert_encoding("\x80", "Shift_JIS", "EUC-JP"));
10 var_dump("\x00\x00\xff\xfd" === mb_convert_encoding("\x80", "UCS-4BE", "UTF-8"));
14 var_dump("\u{fffd}" === mb_convert_encoding("\x80", "UTF-8", "EUC-JP-2004"));
H A Dgh9535b.phpt24 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
26 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
35 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
37 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
46 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
48 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
57 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
59 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
68 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
70 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
H A Dother_encodings.phpt14 var_dump(mb_convert_encoding("ABC", "7bit", "ASCII"));
15 var_dump(mb_convert_encoding("\x80", "7bit", "ASCII"));
16 var_dump(mb_convert_encoding("ABC", "8bit", "7bit"));
18 var_dump(mb_convert_encoding("\xAC\xAC", '7bit', 'UHC'));
22 var_dump(mb_convert_encoding("\x01\x00", "8bit", "UTF-16BE")); // codepoints over 0xFF are illegal …
H A Dmb_convert_encoding_array_error_001.phpt2 Test mb_convert_encoding() function : array functionality with objects not supported
7 mb_convert_encoding(["key" => new stdClass()], 'UTF-8');
10 Warning: mb_convert_encoding(): Object is not supported in %s on line %d
H A Dmb_substr.phpt11 $euc_jp = mb_convert_encoding('0123この文字列は日本語です。EUC-JPを使っています。日本語は面倒臭い。', 'EUC-JP', 'UTF-8');
13 $sjis = mb_convert_encoding('日本語テキストです。0123456789。', 'SJIS', 'UTF-8');
17 $gb18030 = mb_convert_encoding('密码用户名密码名称名称', 'GB18030', 'UTF-8');
23 $utf32 = mb_convert_encoding($utf8, 'UTF-32', 'UTF-8');
25 $utf7 = mb_convert_encoding($utf8, 'UTF-7', 'UTF-8');
98 print "1: " . mb_convert_encoding(mb_substr($utf32, 0, 3, 'UTF-32'), 'UTF-8', 'UTF-32') . "\n";
102 print "5:" . mb_convert_encoding(mb_substr($utf32, 10, 0, 'UTF-32'), 'UTF-8', 'UTF-32') . "\n";
105 print "1: " . mb_convert_encoding(mb_substr($utf7, 0, 3, 'UTF-7'), 'UTF-8', 'UTF-7') . "\n";
107 print "3: " . mb_convert_encoding(mb_substr($utf7, -5, 3, 'UTF-7'), 'UTF-8', 'UTF-7') . "\n";
108 print "4: " . mb_convert_encoding(mb_substr($utf7, 1, null, 'UTF-7'), 'UTF-8', 'UTF-7') . "\n";
[all …]
H A Dhtmlent_encoding.phpt12 $converted = mb_convert_encoding($raw, 'HTML-ENTITIES', 'UTF-8');
18 $converted = mb_convert_encoding($htmlent, 'UTF-8', 'HTML-ENTITIES');
57 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspeci…
59 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspeci…
61 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspeci…
63 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspeci…
65 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspeci…
67 Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated; use htmlspeci…
H A Dmb_substitute_character_variation2.phpt12 var_dump(bin2hex(mb_convert_encoding($string_mb, "ISO-8859-1", "UTF-8")));
15 var_dump(bin2hex(mb_convert_encoding($string_mb, "ISO-8859-1", "UTF-8")));
17 var_dump(bin2hex(mb_convert_encoding($string_mb, "ISO-8859-1", "UTF-8")));
19 var_dump(bin2hex(mb_convert_encoding($string_mb, "ISO-8859-1", "UTF-8")));
H A Dgh9535.phpt26 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
28 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
37 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
39 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
48 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
50 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
61 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
63 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
73 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
75 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
H A Dmb_substr_count.phpt33 var_dump(@mb_substr_count(mb_convert_encoding($a, $to_enc),
34 mb_convert_encoding($b, $to_enc), $to_enc));
37 var_dump(@mb_substr_count(mb_convert_encoding($a, $to_enc),
38 mb_convert_encoding($b, $to_enc), $to_enc));
H A Dmb_convert_encoding_failed_detection.phpt2 mb_convert_encoding() when encoding detection fails
10 var_dump(mb_convert_encoding("\xff", "ASCII", ["UTF-8", "UTF-16"]));
18 Warning: mb_convert_encoding(): Unable to detect character encoding in %s on line %d
H A Dmb_substitute_character.phpt12 var_dump(bin2hex(mb_convert_encoding("\xe2\x99\xa0\xe3\x81\x82", "CP932", "UTF-8")));
16 var_dump(bin2hex(mb_convert_encoding("\xe2\x99\xa0\xe3\x81\x82", "CP932", "UTF-8")));
20 var_dump(bin2hex(mb_convert_encoding("\xe2\x99\xa0\xe3\x81\x82", "CP932", "UTF-8")));
24 var_dump(bin2hex(mb_convert_encoding("\xe2\x99\xa0\xe3\x81\x82", "CP932", "UTF-8")));
H A Dbug65045.phpt2 Bug #65045: mb_convert_encoding breaks well-formed character
17 echo bin2hex(mb_convert_encoding($str, 'UTF-8', 'UTF-8')), "\n";
18 echo bin2hex(mb_convert_encoding($str2, 'UTF-8', 'UTF-8')), "\n";
H A Dbug25140.phpt2 Bug #25140 (mb_convert_encoding returns FALSE on an empty string)
7 var_dump( mb_convert_encoding( '', 'SJIS', 'EUC-JP' ) );

Completed in 32 milliseconds

123