Home
last modified time | relevance | path

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

1234

/php-src/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 Dgh10627.phpt2 GH-10627 (mb_convert_encoding crashes PHP on Windows)
12 var_dump(mb_convert_encoding($data, 'UTF-8', 'auto'));
14 var_dump(mb_convert_encoding($data, 'UTF-8', 'auto'));
16 var_dump(mb_convert_encoding($data, 'UTF-8', 'auto'));
20 Warning: mb_convert_encoding(): Unable to detect character encoding in %s on line %d
26 Warning: mb_convert_encoding(): Unable to detect character encoding in %s on line %d
32 Warning: mb_convert_encoding(): Unable to detect character encoding in %s on line %d
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 Dgh9535b.phpt17 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
19 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
28 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
30 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
39 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
41 $reconverted_str = mb_convert_encoding($cut_str, mb_internal_encoding(), $encoding);
50 $converted_str = mb_convert_encoding($input, $encoding, mb_internal_encoding());
52 $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);
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 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 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 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_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' ) );
H A Dbug60306.phpt8 var_dump($s === mb_convert_encoding(mb_convert_encoding($s, "cp936", "utf8"), "utf8", "cp936"));
H A Dmb_convert_encoding_leak.phpt2 mb_convert_encoding() shouldn't leak keys
10 mb_convert_encoding($array, 'UTF-8', 'UTF-8');

Completed in 18 milliseconds

1234