iso8859_encodings.phpt 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. --TEST--
  2. Exhaustive test of verification and conversion of ISO-8859-X 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. for ($n = 1; $n <= 16; $n++) {
  13. if ($n == 11 || $n == 12)
  14. continue;
  15. testEncodingFromUTF16ConversionTable(__DIR__ . "/data/8859-$n.txt", "ISO-8859-{$n}");
  16. }
  17. // Test "long" illegal character markers
  18. mb_substitute_character("long");
  19. convertInvalidString("\xAE", "%", "ISO8859-7", "UTF-8");
  20. convertInvalidString("\xFF", "%", "ISO8859-8", "UTF-8");
  21. echo "Done!\n";
  22. ?>
  23. --EXPECT--
  24. Tested ISO-8859-1 -> UTF-16BE
  25. Tested UTF-16BE -> ISO-8859-1
  26. Tested ISO-8859-2 -> UTF-16BE
  27. Tested UTF-16BE -> ISO-8859-2
  28. Tested ISO-8859-3 -> UTF-16BE
  29. Tested UTF-16BE -> ISO-8859-3
  30. Tested ISO-8859-4 -> UTF-16BE
  31. Tested UTF-16BE -> ISO-8859-4
  32. Tested ISO-8859-5 -> UTF-16BE
  33. Tested UTF-16BE -> ISO-8859-5
  34. Tested ISO-8859-6 -> UTF-16BE
  35. Tested UTF-16BE -> ISO-8859-6
  36. Tested ISO-8859-7 -> UTF-16BE
  37. Tested UTF-16BE -> ISO-8859-7
  38. Tested ISO-8859-8 -> UTF-16BE
  39. Tested UTF-16BE -> ISO-8859-8
  40. Tested ISO-8859-9 -> UTF-16BE
  41. Tested UTF-16BE -> ISO-8859-9
  42. Tested ISO-8859-10 -> UTF-16BE
  43. Tested UTF-16BE -> ISO-8859-10
  44. Tested ISO-8859-13 -> UTF-16BE
  45. Tested UTF-16BE -> ISO-8859-13
  46. Tested ISO-8859-14 -> UTF-16BE
  47. Tested UTF-16BE -> ISO-8859-14
  48. Tested ISO-8859-15 -> UTF-16BE
  49. Tested UTF-16BE -> ISO-8859-15
  50. Tested ISO-8859-16 -> UTF-16BE
  51. Tested UTF-16BE -> ISO-8859-16
  52. Done!