Lines Matching refs:mb_detect_encoding
2 mb_detect_encoding()
22 print("SJIS: " . mb_detect_encoding($sjis, 'SJIS') . "\n");
23 print("JIS: " . mb_detect_encoding($jis, 'JIS') . "\n");
24 print("EUC-JP: " . mb_detect_encoding($euc_jp, 'UTF-8,EUC-JP,JIS') . "\n");
25 print("EUC-JP: " . mb_detect_encoding($euc_jp, 'JIS,EUC-JP') . "\n");
26 print("UTF-8: " . mb_detect_encoding($polish1, 'UTF-8,UTF-16,ISO-8859-1') . "\n");
27 print("UTF-8: " . mb_detect_encoding($polish2, 'UTF-8,UTF-16,ISO-8859-1') . "\n");
32 print("JIS: " . mb_detect_encoding($jis, $a) . "\n");
33 print("EUC-JP: " . mb_detect_encoding($euc_jp, $a) . "\n");
34 print("SJIS: " . mb_detect_encoding($sjis, $a) . "\n");
45 echo mb_detect_encoding($test, $encodings), "\n";
49 echo mb_detect_encoding($test, ['UTF-8', 'SJIS']), "\n";
60 echo mb_detect_encoding($test, ['UTF-8', 'UTF-16']), "\n";
63 echo mb_detect_encoding($test, ['UTF-8', 'ISO-8859-1']), "\n"; // Should be UTF-8
66 echo mb_detect_encoding($test, ['UTF-8', 'ISO-8859-1']), "\n"; // Should be UTF-8
69 echo mb_detect_encoding('abc', ['UUENCODE', 'UTF-8']), "\n";
70 echo mb_detect_encoding('abc', ['UUENCODE', 'QPrint', 'HTML-ENTITIES', 'Base64', '7bit', '8bit', 'S…
76 print("JIS: " . mb_detect_encoding($jis) . "\n");
78 print("EUC-JP: " . mb_detect_encoding($euc_jp) . "\n");
80 print("SJIS: " . mb_detect_encoding($sjis) . "\n");
84 print("INT: " . mb_detect_encoding(1234, 'EUC-JP') . "\n"); // EUC-JP
86 print("EUC-JP: " . mb_detect_encoding('', 'EUC-JP') . "\n"); // SJIS
89 var_dump(mb_detect_encoding($euc_jp, 'BAD'));
100 $detected = mb_detect_encoding($converted, $encodings);
102 echo "BAD! mb_detect_encoding returned $detected (should have been $encoding)\n";
344 mb_detect_encoding(): Argument #2 ($encodings) contains invalid encoding "BAD"