ISO/IEC 646

ISO/IEC 646 is a set of ISO/IEC 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/IEC 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/IEC 646.

History
ISO/IEC 646 and its predecessor ASCII (ASA X3.4) largely endorsed existing practice regarding character encodings in the telecommunications industry.

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/IEC 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/IEC 8859 series of standards governing 8-bit character encodings supersede the ISO/IEC 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/IEC 10646 standard, directly related to Unicode, supersedes all of the ISO 646 and ISO/IEC 8859 sets with one unified set of character encodings using a larger 21-bit value.

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.

Published standards

 * ECMA-6 (1965-04-30), first edition (withdrawn)
 * ISO/R646-1967 (withdrawn), or ECMA-6 (1967-06), second edition (withdrawn)
 * ECMA-6 (1970-07), third edition (withdrawn)
 * ISO 646:1972 (withdrawn), or ECMA-6 (1973-08), fourth edition (withdrawn)
 * ISO 646:1983 (withdrawn), or ECMA-6 (1984-12, 1985-03), fifth edition (withdrawn)
 * ITU-T Recommendation T.50 IA5 (1988-11-25) (withdrawn), or ISO/IEC 646:1991 (in force), or ECMA-6 (1991-12, 1997-08), sixth edition (in force)
 * ITU-T Recommendation T.50 IRA (1992-09-18) (in force)

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/IEC 646:1991. However, these restrictions are not followed by all national variants.

ISO/IEC 646 national variants
Some national variants of ISO/IEC 646 are as follows:

National derivatives
Some national character sets also exist which are based on ISO/IEC 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/IEC 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:

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/IEC 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/IEC 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/IEC 8859, vendor-specific character sets and eventually Unicode became the preferred methods of coding most of these variants.

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/IEC 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/IEC 646 invariant set). Most NRCS variants are closely related to corresponding national ISO/IEC 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/IEC 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/IEC 646 variants.

HP
HP has code page 1054, which adds the medium shade (▒, U+2592) at 0x7F. Code page 1052 replaces a few ASCII characters from code page 1054.

{{legend|#FFD|Differences from ASCII}}

Derivatives for other alphabets
Some 7-bit character sets for non-Latin alphabets are derived from the ISO/IEC 646 standard: these do not themselves constitute ISO/IEC 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/IEC 646, some of these are mapped to code points which are invariant in ISO/IEC 646 (0x21, 0x3A and 0x3F), and it is therefore not a true ISO/IEC 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/IEC 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.

{| class="wikitable" !rowspan="3" |English (ASCII)!! colspan="6" |Cyrillic alphabets!! colspan="4" |Greek alphabet!!Hebrew ! colspan="8" |Semi-transliterative ! colspan="3" |Naturally ordered !Russian (KOI-7)!!Russian, Bulgarian (WST RU/BG)!!Ukrainian (WST UKR)!!Serbian (SRPSCII)!!Macedonian (MAKSCII)!!Serbian, Macedonian (WST SRP)!!Greek (Symbol)!! Greek (IR-18 )!!Greek (ELOT 927)!!Greek (WST EL)!!Hebrew (SI 960) `||Ю (ju/yu)||Ю (ju/yu)||Ю (ju/yu)||Ж (ž)||Ж (ž)||Ч (č)||≅ ‾||´ `||@ `||ΐ ΰ||א (ʾ/ʔ) ϕ (ph/f)||Ξ (x/ks)|| style="background: gray;" | ||Κ (k)||ך (k final) ς (s final)||ע (/ŋ) ϖ (p)||Ω (ō)||Φ (f/ph)||Φ (f/ph)||צ (ṣ/ts) {||Ш (š/sh)||Ш (š/sh)||Ш (š/sh)||Ш (š/sh)||Ш (š/sh)||Ћ (ć)||[ {||῏ ῟||[
 * A||А||А (a/á)||А||А||А||А||Α||Α||Α||Α||ב (b)
 * B||Б||Б||Б||Б||Б||Б||Β||Β||Β||Β||ג (g)
 * C||Ц (c/ts)||Ц (c/ts)||Ц (c/ts)||Ц (c/ts)||Ц (c/ts)||Ц (c/ts)||Χ (ch/kh)||Ψ (ps)||Γ (g)||Γ (g)||ד (d)
 * D||Д||Д||Д||Д||Д||Д||Δ||Δ||Δ||Δ||ה (h)
 * E||Е (je/ye)||Е (je/ye)||Е (e)||Е (e)||Е (e)||Е (e)||Ε||Ε||Ε||Ε||ו (w)
 * F||Ф||Ф||Ф||Ф||Ф||Ф||Φ (ph/f)||Φ (ph/f)||Ζ (z)||Ζ (z)||ז (z)
 * G||Г||Г||Г||Г||Г||Γ||Γ||Γ||Η (ē)||Η (ē)||ח (ch/kh)
 * H||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Η (ē)||Η (ē)||Θ (th)||Θ (th)||ט (tt)
 * I||И||И||И (y)||И||И||И||Ι||Ι||Ι||Ι||י (j/y)
 * J||Й (j/y)||Й (j/y)||Й (j/y)||Ј (j/y)||Ј (j/y)||Ј (j/y)||ϑ (th)
 * F||Ф||Ф||Ф||Ф||Ф||Ф||Φ (ph/f)||Φ (ph/f)||Ζ (z)||Ζ (z)||ז (z)
 * G||Г||Г||Г||Г||Г||Γ||Γ||Γ||Η (ē)||Η (ē)||ח (ch/kh)
 * H||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Η (ē)||Η (ē)||Θ (th)||Θ (th)||ט (tt)
 * I||И||И||И (y)||И||И||И||Ι||Ι||Ι||Ι||י (j/y)
 * J||Й (j/y)||Й (j/y)||Й (j/y)||Ј (j/y)||Ј (j/y)||Ј (j/y)||ϑ (th)
 * H||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Х (h/kh/ch)||Η (ē)||Η (ē)||Θ (th)||Θ (th)||ט (tt)
 * I||И||И||И (y)||И||И||И||Ι||Ι||Ι||Ι||י (j/y)
 * J||Й (j/y)||Й (j/y)||Й (j/y)||Ј (j/y)||Ј (j/y)||Ј (j/y)||ϑ (th)
 * J||Й (j/y)||Й (j/y)||Й (j/y)||Ј (j/y)||Ј (j/y)||Ј (j/y)||ϑ (th)
 * J||Й (j/y)||Й (j/y)||Й (j/y)||Ј (j/y)||Ј (j/y)||Ј (j/y)||ϑ (th)
 * K||К||К||К||К||К||К||Κ||Κ||Κ||Λ (l)||כ
 * L||Л||Л||Л||Л||Л||Л||Λ||Λ||Λ||Μ (m)||ל
 * M||М||М||М||М||М||М||Μ||Μ||Μ||Ν (n)||ם (m final)
 * N||Н||Н||Н||Н||Н||Н||Ν||Ν||Ν||Ξ (x/ks)||מ (m)
 * O||О||О||О||О||О||О||Ο||Ο||Ξ (x/ks)||Ο||ן (n final)
 * P||П||П||П||П||П||П||Π||Π||Ο (o)||Π||נ (n)
 * Q||Я (ja/ya)||Я (ja/ya)||Я (ja/ya)||Љ (lj/ly)||Љ (lj/ly)||Ќ (Ḱ/kj)||Θ (th)||ͺ ( i )||Π (p)||Ρ (r)||ס (s)
 * R||Р||Р||Р||Р||Р||Р||Ρ||Ρ||Ρ||ʹ
 * O||О||О||О||О||О||О||Ο||Ο||Ξ (x/ks)||Ο||ן (n final)
 * P||П||П||П||П||П||П||Π||Π||Ο (o)||Π||נ (n)
 * Q||Я (ja/ya)||Я (ja/ya)||Я (ja/ya)||Љ (lj/ly)||Љ (lj/ly)||Ќ (Ḱ/kj)||Θ (th)||ͺ ( i )||Π (p)||Ρ (r)||ס (s)
 * R||Р||Р||Р||Р||Р||Р||Ρ||Ρ||Ρ||ʹ
 * Q||Я (ja/ya)||Я (ja/ya)||Я (ja/ya)||Љ (lj/ly)||Љ (lj/ly)||Ќ (Ḱ/kj)||Θ (th)||ͺ ( i )||Π (p)||Ρ (r)||ס (s)
 * R||Р||Р||Р||Р||Р||Р||Ρ||Ρ||Ρ||ʹ
 * R||Р||Р||Р||Р||Р||Р||Ρ||Ρ||Ρ||ʹ
 * R||Р||Р||Р||Р||Р||Р||Ρ||Ρ||Ρ||ʹ
 * S||С||С||С||С||С||С||Σ||Σ||Σ||Σ||ף (p final)
 * T||Т||Т||Т||Т||Т||Т||Τ||Τ||Τ||Τ||פ (p)
 * U||У||У||У||У||У||У||Υ||Θ (th)||Υ||Υ||ץ (ṣ/ts final)
 * V||Ж (ž)||Ж (ž)||Ж (ž)||В||В||В||ς (s final)
 * U||У||У||У||У||У||У||Υ||Θ (th)||Υ||Υ||ץ (ṣ/ts final)
 * V||Ж (ž)||Ж (ž)||Ж (ž)||В||В||В||ς (s final)
 * V||Ж (ž)||Ж (ž)||Ж (ž)||В||В||В||ς (s final)
 * V||Ж (ž)||Ж (ž)||Ж (ž)||В||В||В||ς (s final)
 * W||В (v)||В (v)||В (v)||Њ (nj/ny/ñ)||Њ (nj/ny/ñ)||Ѓ (ǵ/gj)||Ω (ō)||ς (s final)||ς (s final)||Χ (ch/kh)||ק (q)
 * X||Ь (’)||Ь (’)||Ь (’)||Џ (dž)||Џ (dž)||Љ (lj/ly)||Ξ||Χ (ch/kh)||Χ (ch/kh)||Ψ (ps)||ר (r)
 * Y||Ы (y/ı)||Ъ (″/ǎ/ŭ)||І (i)||Ѕ (dz)||Ѕ (dz)||Њ (nj/ny/ñ)||Ψ (ps)||Υ (u)||Ψ (ps)||Ω (ō)||ש (š/sh)
 * Z||З||З||З||З||З||З||Ζ||Ζ||Ω (ō)||Ϊ||ת (t)
 * Y||Ы (y/ı)||Ъ (″/ǎ/ŭ)||І (i)||Ѕ (dz)||Ѕ (dz)||Њ (nj/ny/ñ)||Ψ (ps)||Υ (u)||Ψ (ps)||Ω (ō)||ש (š/sh)
 * Z||З||З||З||З||З||З||Ζ||Ζ||Ω (ō)||Ϊ||ת (t)
 * Z||З||З||З||З||З||З||Ζ||Ζ||Ω (ō)||Ϊ||ת (t)
 * Z||З||З||З||З||З||З||Ζ||Ζ||Ω (ō)||Ϊ||ת (t)