@@ -20,13 +20,22 @@ echo "7bit done\n";
20
20
var_dump (mb_convert_encoding ("\x01\x00" , "8bit " , "UTF-16BE " )); // codepoints over 0xFF are illegal for '8-bit'
21
21
echo "8bit done \n" ;
22
22
23
-
24
23
// UCS-2
25
24
echo bin2hex (mb_convert_encoding ("\xFF\xFE\x00\x30" , "UTF-16BE " , "UCS-2 " )), "\n" ;
26
25
echo bin2hex (mb_convert_encoding ("\xFE\xFF\x30\x00" , "UTF-16BE " , "UCS-2 " )), "\n" ;
27
26
echo bin2hex (mb_convert_encoding ("\x00\x30" , "UTF-16BE " , "UCS-2LE " )), "\n" ;
28
27
echo "UCS-2 done \n" ;
29
28
29
+ // UCS-4
30
+ echo bin2hex (mb_convert_encoding ("\xFF\xFE\x00\x00\x00\x30\x00\x00" , "UTF-16BE " , "UCS-4 " )), "\n" ;
31
+ echo bin2hex (mb_convert_encoding ("\x00\x00\xFE\xFF\x00\x00\x30\x01" , "UTF-16BE " , "UCS-4 " )), "\n" ;
32
+ echo bin2hex (mb_convert_encoding ("\x02\x30\x00\x00" , "UTF-16BE " , "UCS-4LE " )), "\n" ;
33
+ echo bin2hex (mb_convert_encoding ("\x00\x00\x30\x03" , "UTF-16BE " , "UCS-4BE " )), "\n" ;
34
+
35
+ mb_substitute_character ("long " );
36
+ echo mb_convert_encoding ("\x01\x02\x03" , "UTF-8 " , "UCS-4 " ), "\n" ;
37
+ echo "UCS-4 done \n" ;
38
+
30
39
?>
31
40
--EXPECT--
32
41
string(3) "ABC"
@@ -39,3 +48,9 @@ string(1) "%"
39
48
3000
40
49
3000
41
50
UCS-2 done
51
+ 3000
52
+ 3001
53
+ 3002
54
+ 3003
55
+ BAD+20300
56
+ UCS-4 done
0 commit comments