3 "\x8F\xA1\xFF", //2 sub as 2nd is potentially valid as lead
4 "\x8F\xA1", //2 sub, as 2nd is potentially valid as lead
6 "\x8F\xA0", //1 sub, A0 is not valid as sole/first byte
7 "\x8F\xA1\x21", //2 sub, no consume last
8 "\x8F\x21", //1 sub, no consume last
11 "\x8E\x21", //1 sub, no consume last
14 "\xB2\x21", //1 sub, no consume last
18 foreach ($tests as $test) {
19 error_reporting(~E_STRICT
);
20 $a = htmlentities($test, ENT_QUOTES | ENT_SUBSTITUTE
, "EUC-JP");
22 var_dump($a, bin2hex($a));
23 $a = htmlspecialchars($test, ENT_QUOTES | ENT_SUBSTITUTE
, "EUC-JP");
24 var_dump($a, bin2hex($a));