euc_cn_encoding.phpt 627 B

12345678910111213141516171819202122232425
  1. --TEST--
  2. Exhaustive test of verification and conversion of EUC-CN text
  3. --EXTENSIONS--
  4. mbstring
  5. --SKIPIF--
  6. <?php
  7. if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
  8. ?>
  9. --FILE--
  10. <?php
  11. include('encoding_tests.inc');
  12. testEncodingFromUTF16ConversionTable(__DIR__ . '/data/EUC-CN.txt', 'EUC-CN');
  13. // Test "long" illegal character markers
  14. mb_substitute_character("long");
  15. convertInvalidString("\x80", "%", "EUC-CN", "UTF-8");
  16. convertInvalidString("\xA1\x50", "%", "EUC-CN", "UTF-8");
  17. convertInvalidString("\xF7\xFF", "%", "EUC-CN", "UTF-8");
  18. echo "Done!\n";
  19. ?>
  20. --EXPECT--
  21. Tested EUC-CN -> UTF-16BE
  22. Tested UTF-16BE -> EUC-CN
  23. Done!