Lines Matching refs:HZ

2 Exhaustive test of verification and conversion of HZ text
17 testValidString(chr($i), chr($i), 'ASCII', 'HZ');
19 echo "Tested ASCII -> HZ\n";
23 testValidString(chr($i), chr($i), 'HZ', 'ASCII');
25 echo "Tested HZ -> ASCII\n";
28 testInvalidString(chr($i), '%', 'HZ', 'ASCII');
32 testValidString('~~', '~', 'HZ', 'ASCII');
33 testValidString("~\n", '', 'HZ', 'ASCII', false);
34 testValidString('~{~}', '', 'HZ', 'ASCII', false);
35 testValidString("~{~\n~}", '', 'HZ', 'ASCII', false);
36 testValidString('~~?', '~?', 'HZ', 'ASCII');
43 testInvalidString("~" . chr($i), '%', 'HZ', 'ASCII');
45 testInvalidString("~{~" . chr($i) . "~}", '%', 'HZ', 'ASCII');
72 testValidString('~{' . $fromString . '~}', $toString, 'HZ', 'UTF-16BE', $reversible);
89 testInvalidString('~{' . $fromString . '~}', $toString, 'HZ', 'UTF-16BE');
94 testInvalidString('~{' . $truncatedChar, "\x00%", 'HZ', 'UTF-16BE');
97 echo "Tested HZ -> UTF-16BE (for all GB2312 characters)\n";
102 // valid to convert to HZ
117 convertInvalidString($fromString, $toString, 'UTF-16BE', 'HZ');
120 echo "Tested UTF-16BE -> HZ (for all GB2312 characters)\n";
123 if (mb_convert_encoding("\x7A\xFA\x00\x00", 'HZ', 'UTF-16BE') !== "~{\x73\x43~}\x00")
125 if (mb_convert_encoding("~", 'UTF-16BE', 'HZ') !== "")
131 if (substr(mb_convert_encoding($str, 'HZ', 'CP51932'), -4) !== "\x45\x49~}")
136 convertInvalidString("~A", "%", "HZ", "UTF-8");
137 convertInvalidString("\x80", "%", "HZ", "UTF-8");
138 convertInvalidString("~{\x22\x21", "%", "HZ", "UTF-8");
143 Tested ASCII -> HZ
144 Tested HZ -> ASCII
148 Tested HZ -> UTF-16BE (for all GB2312 characters)
149 Tested UTF-16BE -> HZ (for all GB2312 characters)