ISO/IEC 646 is the name of a set of ISO standards, described as Information technology — ISO 7-bit coded character set for information interchange and developed in cooperation with ASCII at least since 1964.
Since its first edition in 1967 it has specified a 7-bit character code from which several national standards are derived.
ISO/IEC 646 was also ratified by ECMA as ECMA-6.
The first version of ECMA-6 had been published in 1965, based on work the ECMA's Technical Committee TC1 had carried out since December 1960.
Characters in the ISO/IEC 646 Basic Character Set are invariant characters.
Since that portion of ISO/IEC 646, that is the invariant character set shared by all countries, specified only those letters used in the ISO basic Latin alphabet, countries using additional letters needed to create national variants of ISO 646 to be able to use their native scripts.
Since transmission and storage of 8-bit codes was not standard at the time, the national characters had to be made to fit within the constraints of 7 bits, meaning that some characters that appear in ASCII do not appear in other national variants of ISO 646.
History
ISO/IEC 646 and its predecessor ASCII (ASA X3.4) largely endorsed existing practice regarding character encodings in the telecommunications industry.
thumb|US-ASCII, or ISO 646:US As ASCII did not provide a number of characters needed for languages other than English, a number of national variants were made that substituted some less-used characters with needed ones.
Due to the incompatibility of the various national variants, an International Reference Version (IRV) of ISO/IEC 646 was introduced, in an attempt to at least restrict the replaced set to the same characters in all variants.
The original version (ISO 646 IRV) differed from ASCII only in that code point 0x24, ASCII's dollar sign ($) was replaced by the international currency symbol (¤).
The final 1991 version of the code ISO 646:1991 is also known as ITU T.50, International Reference Alphabet or IRA, formerly International Alphabet No. 5 (IA5).
This standard allows users to exercise the 12 variable characters (i.e., two alternative graphic characters and 10 national defined characters).
Among these exercises, ISO 646:1991 IRV (International Reference Version) is explicitly defined and identical to ASCII.
The ISO 8859 series of standards governing 8-bit character encodings supersede the ISO 646 international standard and its national variants, by providing 96 additional characters with the additional bit and thus avoiding any substitution of ASCII codes.
The ISO 10646 standard, directly related to Unicode, supersedes all of the ISO 646 and ISO 8859 sets with one unified set of character encodings using a larger 21-bit value.
thumb|ISO 646:JP A legacy of ISO/IEC 646 is visible on Windows, where in many East Asian locales the backslash character used in filenames is rendered as ¥ or other characters such as ₩.
Despite the fact that a different code for ¥ was available even on the original IBM PC's code page 437, and a separate double-byte code for ¥ is available in Shift JIS (although this often uses alternative mapping), so much text was created with the backslash code used for ¥ (due to Shift_JIS being officially based on ISO 646:JP, although Microsoft maps it as ASCII) that even modern Windows fonts have found it necessary to render the code that way.
A similar situation exists with ₩ and EUC-KR.
Another legacy is the existence of trigraphs in the C programming language.
{{anchor|1967|1972|1983|1991}}Published standards
ISO/R646-1967
ISO 646:1972
ISO 646:1983
ISO/IEC 646:1991
ECMA-6 (1965-04-30), first edition
ECMA-6 (1967-06), second edition
ECMA-6 (1970-07), third edition
ECMA-6 (1973-08), fourth edition
ECMA-6 (1984-12, 1985-03), fifth edition
ECMA-6 (1991-12, 1997-08), sixth edition
Code page layout
The following table shows the ISO/IEC 646 Invariant character set.
Each character is shown with its Unicode equivalent.
National code points are gray with the ASCII character that is replaced.
Yellow indicates a character that, in some regions, could be combined with a previous character as a diacritic using the backspace character, which may affect glyph choice.
In addition to the invariant set restrictions, 0x23 is restricted to be either # or £ and 0x24 is restricted to be either $ or ¤ in ECMA-6:1991, equivalent to ISO 646:1991.
However, these restrictions are not followed by all national variants.
Related encoding families
National Replacement Character Set
The National Replacement Character Set (NRCS) is a family of 7-bit encodings introduced in 1983 by DEC with the VT200 series of computer terminals.
It is closely related to ISO 646, being based on a similar invariant subset of ASCII, differing in retaining $ as invariant but not _ (although most NRCS variants retain the _, and hence comply with the ISO 646 invariant set).
Most NRCS variants are closely related to corresponding national ISO 646 variants where they exist, with the exception of the Dutch variant.
World System Teletext
The European telecommunications standard ETS 300 706, "Enhanced Teletext specification", defines Latin, Greek, Cyrillic, Arabic and Hebrew code sets with several national variants for both Latin and Cyrillic.
Like NRCS and ISO 646, within the Latin variants, the family of encodings known as the G0 set are based on a similar invariant subset of ASCII, but do not retain either $ nor _ as invariant.
Unlike NRCS, variants often differ considerably from corresponding national ISO 646 variants.
Variant codes and descriptions
ISO 646 national variants
Some national variants of ISO 646 are as follows:
National derivatives
Some national character sets also exist which are based on ISO 646 but do not strictly follow its invariant set (see also § Derivatives for other alphabets):
Control characters
All the variants listed above are solely graphical character sets, and are to be used with a C0 control character set such as listed in the following table:
Associated supplementary character sets
The following table lists supplementary graphical character sets defined by the same standard as specific ISO 646 variants.
These would be selected by using a mechanism such as shift out or the NATS super shift (single shift), or by setting the eighth bit in environments where one was available:
{{anchor|CA|CA2|CN|CU|DE|DK|ES|ES2|FI|FR|FR1|GB|HU|INV|IRV|IT|JP|JP-OCR-B|KR|NO|NO2|PT|PT2|SE|SE2|US|YU|DANO|SEFI|2|6|13|27|49|T.61|MT|TW|IS|IE|NL|swi|pl|greek|teletex|INIS}}Variant comparison chart
The specifics of the changes for some of these variants are given in the following table.
Character assignments unchanged across all listed variants (i.e. which remain the same as ASCII) are not shown.
For ease of comparison, variants detailed include national variants of ISO 646, DEC's closely related National Replacement Character Set (NRCS) series used on VT200 terminals, the related European World System Teletext encoding series defined in ETS 300 706, and a few other closely related encodings based on ISO 646.
Individual code charts are linked from the second column.
The cells with non-white background emphasize the differences from US-ASCII (also the Basic Latin subset of ISO/IEC 10646 and Unicode).
Several characters could be used as combining characters, when preceded or followed with a backspace C0 control.
This is attested in the code charts for IRV, GB, FR1, CA and CA2, which note that "',^ would behave as the diaeresis, acute accent, cedilla and circumflex (rather than quotation marks, a comma and an upward arrowhead) when preceded or followed by a backspace.
The tilde character (~) was similarly introduced as a diacritic (˜).
This encoding method originated in the typewriter/teletype era when use of backspace would overstamp a glyph, and may be considered deprecated.
Later, when wider character sets gained more acceptance, ISO 8859, vendor-specific character sets and eventually Unicode became the preferred methods of coding most of these variants.
{{anchor|GR}}Derivatives for other alphabets
Some 7-bit character sets for non-Latin alphabets are derived from the ISO 646 standard: these do not themselves constitute ISO 646 due to not following its invariant code points (often replacing the letters of at least one case), due to supporting differing alphabets which the set of national code points provide insufficient encoding space for.
Examples include:
7-bit Turkmen (ISO-IR-230).
7-bit Greek.
In ELOT 927 (ISO-IR-088), the Greek alphabet is mapped in alphabetical order (except for the final-sigma) to positions 0x61–0x71 and 0x73–0x79, on top of the Latin lowercase letters.
ISO-IR-018 maps the Greek alphabet over both letter cases using a different scheme (not in alphabetical order, but trying where possible to match Greek letters over Roman letters which correspond in some sense), and ISO-IR-019 maps the Greek uppercase alphabet over the Latin lowercase letters using the same scheme as ISO-IR-018.
The lower half of the Symbol font character encoding uses its own scheme for mapping Greek letters of both cases over the ASCII Roman letters, also trying to map Greek letters over Roman letters which correspond in some sense, but making different decisions in this regard (see chart below).
It also replaces invariant code points 0x22 and 0x27 and five national code points with mathematical symbols.
Although not intended for use in typesetting Greek prose, it is sometimes used for that purpose.
ISO-IR-027 (detailed in the chart above rather than below) includes the Latin alphabet unchanged, but adds some Greek capital letters which cannot be represented with Latin-script homoglyphs; while it is explicitly based on ISO 646, some of these are mapped to code points which are invariant in ISO 646 (0x21, 0x3A and 0x3F), and it is therefore not a true ISO 646 variant.
The World System Teletext encoding for Greek uses yet another scheme of mapping Greek letters in alphabetical order over the ASCII letters of both cases, notably including several letters with diacritics.
7-bit Cyrillic
KOI-7 or Short KOI, used for Russian.
The Cyrillic characters are mapped to positions 0x60–0x7E, on top of the Latin lowercase letters, matching homologous letters where possible (where в is mapped to w, not v).
Superseded by the KOI-8 variants.
SRPSCII and MAKSCII, Cyrillic variants of YUSCII (the Latin variant is YU/ISO-IR-141 in the chart above), used for Serbian and Macedonian respectively.
Largely homologous to the Latin variant of YUSCII (following Serbian digraphia rules), except for Љ (lj), Њ (nj), Џ (dž) and ѕ (dz), which correspond to digraphs in Latin-script orthography, and are mapped over letters which are not used in Serbian or Macedonian (q, w, x, y).
The G0 sets for the World System Teletext encodings for Russian/Bulgarian and Ukrainian use G0 sets similar to KOI-7 with some modifications.
The corresponding G0 set for Serbian Cyrillic uses a scheme based on the Teletext encoding for Latin-script Serbo-Croatian and Slovene, as opposed to the significantly different YUSCII.
7-bit Hebrew, SI 960.
The Hebrew alphabet is mapped to positions 0x60–0x7A, on top of the lowercase Latin letters (and grave accent for aleph).
7-bit Hebrew was always stored in visual order.
This mapping with the high bit set, i.e. with the Hebrew letters in 0xE0–0xFA, is ISO 8859-8.
The World System Teletext encoding for Hebrew uses the same letter mappings, but uses BS_Viewdata as its base encoding (whereas SI 960 uses US-ASCII) and includes a shekel sign at 0x7B.
7-bit Arabic, ASMO 449 (ISO-IR-089).
The Arabic alphabet is mapped to positions 0x41–0x5A and 0x60–0x6A, on top of both uppercase and lowercase Latin letters.
A comparison of some of these encodings is below.
Only one case is shown, except in instances where the cases are mapped to different letters.
In such instances, the mapping with the smallest code is shown first.
Possible transcriptions are given for some letters; where this is omitted, the letter can be considered to correspond to the Roman one which it is mapped over.
See also
ISO/IEC 2022 Information technology: Character code structure and extension techniques
ISO/IEC 6937 (ANSI)
ISO/IEC JTC 1/SC 2
Footnotes
References
Further reading
Source documents on the history of character codes, 1972-1975 : Compiled by Eric Fischer : Free Download, Borrow, and Streaming : Internet Archive (79 pages) including:  (13+5 pages) and many other documents and correspondence.
External links
Zeichensatz nach ISO 646 (ASCII) (in German)
History at GNU Aspell website
ISO646 Character Tables Character Tables by Koichi Yasuoka (安岡孝) (see Domestic ISO646 Character Tables and Quasi-ISO646 Character Tables)
Turkish Text Deasciifier a tool (based on statistical pentagram analysis of the Turkish language) which reverts an ASCII'fied Turkish text by determining the appropriate (but ambiguous) diacritics normally needed in Turkish but missing in the US-ASCII set.
