1--TEST--
2Test verification and conversion of UCS-4 text
3--EXTENSIONS--
4mbstring
5--FILE--
6<?php
7include('encoding_tests.inc');
8mb_substitute_character(0x25);
9
10// Test "long" illegal character markers
11mb_substitute_character("long");
12convertInvalidString("\x6F\x00\x00\x00", "U+6F000000", "UCS-4BE", "UTF-8");
13convertInvalidString("\x70\x00\x00\x00", "U+70000000", "UCS-4BE", "UTF-8");
14convertInvalidString("\x78\x00\x00\x01", "U+78000001", "UCS-4BE", "UTF-8");
15convertInvalidString("\x80\x01\x02\x03", "U+80010203", "UCS-4BE", "UTF-8");
16convertInvalidString("\x00\x01\x02", "%", "UCS-4BE", "UTF-8");
17
18convertInvalidString("\x00\x00\x00\x6F", "U+6F000000", "UCS-4LE", "UTF-8");
19convertInvalidString("\x00\x00\x00\x70", "U+70000000", "UCS-4LE", "UTF-8");
20convertInvalidString("\x01\x00\x00\x78", "U+78000001", "UCS-4LE", "UTF-8");
21convertInvalidString("\x02\x01\x00", "%", "UCS-4LE", "UTF-8");
22
23echo "Done!";
24?>
25--EXPECT--
26Done!
27