cp1252_encoding.phpt 565 B

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