This test runs through 420 charset aliases which are not compatible with ASCII characters less than or equal to 0x7F. The test case uses a source string which in ASCII looks like:
$%'()*+,-./<>:;=
This test string was chosen for it's syntactically meaninful characters which are used in HTML and other Web protocols. The source string has been transcoded to each of the target encodings, stored in a plain text file with the alias as its filename and no extension. An XHR request is generated for each alias. The response includes a Content-Type header set to text/plain with a charset of the requested alias. For example, when testing UTF-16, the HTTP header returned would be:
Content-Type: text/plain; charset=UTF-16
The encoded strings have been prepared using ICU to transcode a source string into the target encoding. The response text is compared in javascript to the expected string, which should match the original, Unicode-encoded source string.
[1] ascii-safe An ASCII-compatible character encoding is a single-byte or variable-length encoding in which the bytes 0x09, 0x0A, 0x0C, 0x0D, 0x20 - 0x22, 0x26, 0x27, 0x2C - 0x3F, 0x41 - 0x5A, and 0x61 - 0x7A, ignoring bytes that are the second and later bytes of multibyte sequences, all correspond to single-byte sequences that map to the same Unicode characters as those bytes in ANSI_X3.4-1968 (US-ASCII). [RFC1345]
[2] ascii-unsafe ASCII-compatible bytes do not map.
ICU was used to perform the transcoding of the source string to each target encoding.
Either type in a charset alias to run a single test, or run a test of all prepared charset encodings.