cp1251_encoding.phpt 577 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Exhaustive test of verification and conversion of CP1251 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/CP1251.txt', 'CP1251');
  13. // Test "long" illegal character markers
  14. mb_substitute_character("long");
  15. convertInvalidString("\x98", "%", "CP1251", "UTF-8");
  16. convertInvalidString("\x12\x34", "U+1234", "UTF-16BE", "CP1251");
  17. echo "Done!\n";
  18. ?>
  19. --EXPECT--
  20. Tested CP1251 -> UTF-16BE
  21. Tested UTF-16BE -> CP1251
  22. Done!