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