Jump to content

Unicode: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
AnnaFrance (talk | contribs)
m clean up, typos fixed: submittted → submitted using AWB
Jhinman (talk | contribs)
Line 201: Line 201:
UTF encodings include:
UTF encodings include:


* [[UTF-1]] — in 1994 retired predecessor of UTF-8, maximizes compatibility with [[ISO/IEC 2022|ISO 2022]], not more part of ''The Unicode Standard''
* [[UTF-1]] — a retired predecessor of UTF-8, maximizes compatibility with [[ISO/IEC 2022|ISO 2022]], no longer part of ''The Unicode Standard''
* [[UTF-7]] — a relatively unpopular 7-bit encoding, often considered obsolete (not part of ''The Unicode Standard'' but rather an RFC)
* [[UTF-7]] — a relatively unpopular 7-bit encoding, often considered obsolete (not part of ''The Unicode Standard'' but rather an RFC)
* [[UTF-8]] — an 8-bit, variable-width encoding, which maximizes compatibility with [[ASCII]].
* [[UTF-8]] — an 8-bit, variable-width encoding, which maximizes compatibility with [[ASCII]].

Revision as of 00:17, 5 June 2008

File:Unicodeconsortium bookv5.jpg
The Unicode Standard, Version 5.0

Template:Table UnicodeIn computing, Unicode is an industry standard allowing computers to consistently represent and manipulate text expressed in most of the world's writing systems. Developed in tandem with the Universal Character Set standard and published in book form as The Unicode Standard, Unicode consists of a repertoire of about 100,000 characters, a set of code charts for visual reference, an encoding methodology and set of standard character encodings, an enumeration of character properties such as upper and lower case, a set of reference data computer files, and a number of related items, such as character properties, rules for normalization, decomposition, collation, rendering and bidirectional display order (for the correct display of text containing both right-to-left scripts, such as Arabic or Hebrew, and left-to-right scripts).[1]

The Unicode Consortium, the non-profit organization that coordinates Unicode's development, has the ambitious goal of eventually replacing existing character encoding schemes with Unicode and its standard Unicode Transformation Format (UTF) schemes, as many of the existing schemes are limited in size and scope and are incompatible with multilingual environments.

Unicode's success at unifying character sets has led to its widespread and predominant use in the internationalization and localization of computer software. The standard has been implemented in many recent technologies, including XML, the Java programming language, the Microsoft .NET Framework and modern operating systems.

Unicode can be implemented by different character encodings. The most commonly used encodings are UTF-8 (which uses 1 byte for all ASCII characters, which have the same code values as in the standard ASCII encoding, and up to 4 bytes for other characters), the now-obsolete UCS-2 (which uses 2 bytes for all characters, but does not include every character in the Unicode standard), and UTF-16 (which extends UCS-2, using 4 bytes to encode characters missing from UCS-2).

Origin and development

Unicode has the explicit aim of transcending the limitations of traditional character encodings, such as those defined by the ISO 8859 standard which find wide usage in various countries of the world but remain largely incompatible with each other. Many traditional character encodings share a common problem in that they allow bilingual computer processing (usually using Roman characters and the local script) but not multilingual computer processing (computer processing of arbitrary scripts mixed with each other).

Unicode, in intent, encodes the underlying charactersgraphemes and grapheme-like units — rather than the variant glyphs (renderings) for such characters. In the case of Chinese characters, this sometimes leads to controversies over distinguishing the underlying character from its variant glyphs (see Han unification).

In text processing, Unicode takes the role of providing a unique code point — a number, not a glyph — for each character. In other words, Unicode represents a character in an abstract way and leaves the visual rendering (size, shape, font or style) to other software, such as a web browser or word processor. This simple aim becomes complicated, however, by concessions made by Unicode's designers in the hope of encouraging a more rapid adoption of Unicode.

The first 256 code points were made identical to the content of ISO 8859-1 so as to make it trivial to convert existing western text. Many essentially identical characters were encoded multiple times at different code points to preserve distinctions used by legacy encodings and therefore allow conversion from those encodings to Unicode (and back) without losing any information. For example, the "fullwidth forms" section of code points encompasses a full Latin alphabet that is separate from the main Latin alphabet section. In Chinese, Japanese and Korean (CJK) fonts, these characters are rendered at the same width as CJK ideographs rather than at half the width. For other examples, see Duplicate characters in Unicode.

Architecture and Terminology

  • Plane 0 (0000–FFFF): Basic Multilingual Plane (BMP)
  • Plane 1 (10000–1FFFF): Supplementary Multilingual Plane (SMP)
  • Plane 2 (20000–2FFFF): Supplementary Ideographic Plane (SIP)
  • Planes 3 to 13 (30000–DFFFF) are currently unassigned
  • Plane 14 (E0000–EFFFF): Supplementary Special-purpose Plane (SSP)
  • Plane 15 (F0000–FFFFF): Supplementary Private Use Area-A
  • Plane 16 (100000–10FFFF): Supplementary Private Use Area-B

All code points in the BMP are accessed as a single code point in UTF-16 encoding, whereas the code points in Planes 1 through 16 (supplementary planes, or, informally, astral planes) are accessed as surrogate pairs in UTF-16. Within each plane characters are allocated in named blocks of related characters. Although blocks are an arbitrary size, they are always a multiple 16 code points, and often a multiple of 128 code points. Characters required for a given script may be spread out over several different blocks. The following categories of code points are defined:

  • Surrogate code points
  • Noncharacters
  • Reserved characters
  • Private use characters
  • Graphic characters
  • Format characters
  • Control code characters

Code points in the range U+D800..U+DBFF (1,024 code points) are known as high-surrogate code points, and code points in the range U+DC00..U+DFFF (1,024 code points) are known as low-surrogate code points. A high-surrogate code point (also known as a leading surrogate) followed by a low-surrogate code point (also known as a trailing surrogate) together form a surrogate pair that represents a code point outside the Basic Multilingual Plane in the UTF-16 encoding form. High and low surrogate code points are not valid by themselves, and are only valid as surrogate pairs in UTF-16 encoded texts. Thus the range of code points that are available for use as characters is U+0000..U+D7FF and U+E000..U+10FFFF (1,112,064 code points). The hexadecimal value of these code points (i.e. excluding surrogates) is sometimes referred to as the character's scalar value. Noncharacters are code points that are guaranteed never to be used for encoding characters, although applications may make use of these code points internally if they wish. There are sixty-six noncharacters: U+FDD0..U+FDEF and any code point ending in the value FFFE or FFFF (i.e. U+FFFE, U+FFFF, U+1FFFE, U+1FFFF, ... U+10FFFE, U+10FFFF). The set of noncharacters is stable, and no new noncharacters will ever be defined.[3] Reserved code points are those code points which are available for use as encoded characters, but are not yet defined as characters by Unicode. Private use characters are defined as characters for private use The semantics of these characters are not defined by Unicode, and so any interchange of such characters requires an agreement between sender and receiver on their interpretation. There are three private use areas in the Unicode codespace:

  • Private Use Area: U+E000..U+F8FF (6,400 characters)
  • Supplementary Private Use Area-A: U+F0000..U+FFFFD (65,534 characters)
  • Supplementary Private Use Area-B: U+100000..U+10FFFD (65,534 characters)

Graphic characters are characters defined by Unicode to have a particular semantic, and either have a visible glyph shape or represent a visible space. As of Unicode 5.1 there are 100,507 graphic characters. Format characters are characters that do not have a visible appearance, but may have an effect on the appearance or behaviour of neighbouring characters. For example, U+200C ZERO WIDTH NON-JOINER and U+200D ZERO WIDTH JOINER may be used to change the default shaping behaviour of adjacent characters (e.g. to inhibit ligatures or request ligature formation). There are 141 format characters in Unicode 5.1. Sixty-five code points (U+0000..U+001F and U+007F.. U+009F) are reserved as control codes, and correspond to the C0 and C1 control codes defined in ISO/IEC 6429. Of these U+0009 (Tab), U+000A (Line Feed) and U+000D (Carriage Return) are widely used in Unicode-encoded texts. Graphic characters, format characters, control code characters and private use characters are collectively known as assigned characters. The set of graphic and format characters defined by Unicode does not correspond directly to the repertoire of abstract characters that is representable under Unicode. Unicode encodes characters by associating an abstract character with a particular code point.[4] However, not all abstract characters are encoded as a single Unicode character, and some abstract characters may be represented in Unicode by a sequence of two or more characters. For example, Latin Small Letter I With Ogonek And Dot Above And Acute, which is required in Lithuanian, is represented by the character sequence U+012F, U+0307, U+0301. Unicode maintains a list of uniquely named character sequences for abstract characters that are not directly encoded in Unicode.[5] All graphic, format and private use characters have a unique and immutable name by which they may be identified. Although a Unicode character name may not be changed under any circumstances (historically this was not the case), in cases where the name is seriously defective and misleading or has a serious typographical error, a formal alias may be defined, and applications are encouraged to use the formal alias in place of the official character name. For example, U+A015 YI SYLLABLE WU has the formal alias YI SYLLABLE ITERATION MARK, and U+FE18 PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET has the formal alias PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRACKET.[6]

Standard

The Unicode Consortium, based in California, develops the Unicode standard. There are various levels of membership, and any company or individual willing to pay the membership dues may join this organization. Full members include most of the main computer software and hardware companies with any interest in text-processing standards, including Adobe Systems, Apple, Google, HP, IBM, Microsoft, Sun Microsystems and Yahoo.

The Consortium first published The Unicode Standard (ISBN 0-321-18578-1) in 1991, and continues to develop standards based on that original work. The latest major version of the standard, Unicode 5.0 (ISBN 0-321-48091-0), was published in 2007. The data files for the most recent minor version, Unicode 5.1, are available from the consortium's web site.

Unicode is developed in conjunction with the International Organization for Standardization and shares the character repertoire with ISO/IEC 10646: the Universal Character Set. Unicode and ISO/IEC 10646 function equivalently as character encodings, but The Unicode Standard contains much more information for implementers, covering — in depth — topics such as bitwise encoding, collation and rendering. The Unicode Standard enumerates a multitude of character properties, including those needed for supporting bidirectional text. The two standards do use slightly different terminology.

Thus far the following major and minor versions of the Unicode standard have been published (update versions, which do not include any changes to character repertoire, are omitted).[7]

Version Date Book Corresponding ISO/IEC 10646 Edition Scripts Characters
1.0.0 October 1991 ISBN 0-201-56788-1 (Vol.1) 24 7,161
1.0.1 June 1992 ISBN 0-201-60845-6 (Vol.2) 25 28,359
1.1 June 1993 ISO/IEC 10646-1:1993 24 34,233
2.0 July 1996 ISBN 0-201-48345-9 ISO/IEC 10646-1:1993 plus Amendments 5, 6 and 7 25 38,950
2.1 May 1998 ISO/IEC 10646-1:1993 plus Amendments 5, 6 and 7, and two characters from Amendment 18 25 38,952
3.0 September 1999 ISBN 0-201-61633-5 ISO/IEC 10646-1:2000 38 49,259
3.1 March 2001 ISO/IEC 10646-1:2000

ISO/IEC 10646-2:2001

41 94,205
3.2 March 2002 ISO/IEC 10646-1:2000 plus Amendment 1

ISO/IEC 10646-2:2001

45 95,221
4.0 April 2003 ISBN 0-321-18578-1 ISO/IEC 10646:2003 52 96,447
4.1 March 2005 ISO/IEC 10646:2003 plus Amendment 1 59 97,720
5.0 July 2006 ISBN 0-321-48091-0 ISO/IEC 10646:2003 plus Amendments 1 and 2, and four characters from Amendment 3 64 99,089
5.1 April 2008 ISO/IEC 10646:2003 plus Amendments 1, 2, 3 and 4 75 100,713

Unicode 5.2, corresponding to ISO/IEC 10646:2003 plus Amendments 1-6, is tentatively scheduled for release in Summer 2009.[8]

Scripts covered

Many modern applications can render a substantial subset of the myriad Unicode scripts, as demonstrated by this screenshot from the OpenOffice.org application.

Unicode covers almost all scripts (writing systems) in current use today.[9]

Although 75 writing systems (alphabets, syllabaries, and others) are included in the latest version of Unicode, there remain more still awaiting encoding, particularly some used in historical, liturgical and academic settings. Further additions of characters to the already-encoded scripts, as well as symbols, in particular for mathematics and music (in the form of notes and rhythmic symbols), also occur. The Unicode Roadmap Committee (Michael Everson, Rick McGowan, and Ken Whistler) maintain the list of scripts that are candidates or potential candidates for encoding and their tentative code block assignments on the Unicode Roadmap page of the Unicode Consortium Web site. For some scripts on the Roadmap, encoding proposals have been made and are working their way through the approval process. For others, no proposal has yet been made, and they await agreement on character repertoire and other details from the user communities involved.

Among the scripts currently scheduled for encoding in the next version of Unicode are Avestan, Egyptian Hieroglyphics, Tai Tham, Tai Viet, Imperial Aramaic, Inscriptional Pahlavi, Inscriptional Parthian, Javanese, Kaithi, Lisu, Meetei Mayek, Nü Shu, Old South Arabian, Old Turkic, Samaritan and Tangut.[10]

Other scripts for which an encoding proposal is anticipated to be submitted in the near future include Classical Yi, Old Uyghur and Oracle Bone Script. However, there are a number of writing systems, such as Mayan, Rongorongo and Linear A which are not currently being considered for encoding.

Modern invented scripts, most of which do not qualify for inclusion in Unicode due to lack of real-world usage, are listed in the ConScript Unicode Registry, along with unofficial but widely-used Private Use Area code assignments.

Mapping and encodings

Several mechanisms have been specified for implementing Unicode; which one implementers choose depends on available storage space, source code compatibility, and interoperability with other systems.

Unicode Transformation Format and Universal Character Set

Unicode defines two mapping methods: the Unicode Transformation Format (UTF) encodings, and the Universal Character Set (UCS) encodings. An encoding maps (possibly a subset of) the range of Unicode code points to sequences of values in some fixed-size range, termed code values. The numbers in the names of the encodings indicate the number of bits in one code value (for UTF encodings) or the number of bytes per code value (for UCS) encodings. UTF-8 and UTF-16 are probably the most commonly used encodings. UCS-2 is an obsolete subset of UTF-16; UCS-4 and UTF-32 are functionally equivalent.

UTF encodings include:

  • UTF-1 — a retired predecessor of UTF-8, maximizes compatibility with ISO 2022, no longer part of The Unicode Standard
  • UTF-7 — a relatively unpopular 7-bit encoding, often considered obsolete (not part of The Unicode Standard but rather an RFC)
  • UTF-8 — an 8-bit, variable-width encoding, which maximizes compatibility with ASCII.
  • UTF-EBCDIC — an 8-bit variable-width encoding, which maximizes compatibility with EBCDIC. (not part of The Unicode Standard)
  • UTF-16 — a 16-bit, variable-width encoding
  • UTF-32 — a 32-bit, fixed-width encoding

UTF-8 uses one to four bytes per code point and, being compact for Latin scripts and ASCII-compatible, provides the de facto standard encoding for interchange of Unicode text. It is also used by most recent Linux distributions as a direct replacement for legacy encodings in general text handling.

The UCS-2 and UTF-16 encodings specify the Unicode Byte Order Mark (BOM) for use at the beginnings of text files, which may be used for byte ordering detection (or byte endianness detection). Some software developers have adopted it for other encodings, including UTF-8, which does not need an indication of byte order. In this case it attempts to mark the file as containing Unicode text. The BOM, code point U+FEFF has the important property of unambiguity on byte reorder, regardless of the Unicode encoding used; U+FFFE (the result of byte-swapping U+FEFF) does not equate to a legal character, and U+FEFF in other places, other than the beginning of text, conveys the zero-width no-break space (a character with no appearance and no effect other than preventing the formation of ligatures). Also, the units FE and FF never appear in UTF-8. The same character converted to UTF-8 becomes the byte sequence EF BB BF.

In UTF-32 and UCS-4, one 32-bit code value serves as a fairly direct representation of any character's code point (although the endianness, which varies across different platforms, affects how the code value actually manifests as an octet sequence). In the other cases, each code point may be represented by a variable number of code values. UTF-32 is widely used as internal representation of text in programs (as opposed to stored or transmitted text), since every Unix operating system which uses the gcc compilers to generate software uses it as the standard "wide character" encoding. Recent versions of the Python programming language (beginning with 2.2) may also be configured to use UTF-32 as the representation for unicode strings, effectively disseminating such encoding in high-level coded software.

Punycode, another encoding form, enables the encoding of Unicode strings into the limited character set supported by the ASCII-based Domain Name System. The encoding is used as part of IDNA, which is a system enabling the use of Internationalized Domain Names in all scripts that are supported by Unicode. Earlier and now historical proposals include UTF-5 and UTF-6.

GB18030 is another encoding form for Unicode, from the Standardization Administration of China. It is the official character set of the People's Republic of China (PRC). BOCU-1 and SCSU are Unicode compression schemes. The April Fools' Day RFC of 2005 specified two parody UTF encodings, UTF-9 and UTF-18.

Ready-made versus composite characters

Unicode includes a mechanism for modifying character shape and so greatly extending the supported glyph repertoire. This covers the use of combining diacritical marks. They get inserted after the main character (one can stack several combining diacritics over the same character). Unicode also contains precomposed versions of most letter/diacritic combinations in normal use. These make conversion to and from legacy encodings simpler and allow applications to use Unicode as an internal text format without having to implement combining characters. For example é can be represented in Unicode as U+0065 (Latin small letter e) followed by U+0301 (combining acute) but it can also be represented as the precomposed character U+00E9 (Latin small letter e with acute). So in many cases, users have many ways of encoding the same character. To deal with this, Unicode provides the mechanism of canonical equivalence.

An example of this arises with hangul, the Korean alphabet. Unicode provides the mechanism for composing hangul syllables with their individual subcomponents, known as hangul Jamo. However, it also provides all 11,172 combinations of precomposed hangul syllables.

The CJK ideographs currently have codes only for their precomposed form. Still, most of those ideographs comprise simpler elements (often called radicals in English), so in principle Unicode could have decomposed them just as it has happened with hangul. This would have greatly reduced the number of required code points, while allowing the display of virtually every conceivable ideograph (which might do away with some of the problems caused by the Han unification). A similar idea covers some input methods, such as Cangjie and Wubi. However, attempts to do this for character encoding have stumbled over the fact that ideographs do not actually decompose as simply or as regularly as it seems they should.

A set of radicals was provided in Unicode 3.0 (CJK radicals between U+2E80 and U+2EFF, KangXi radicals in U+2F00 to U+2FDF, and ideographic description characters from U+2FF0 to U+2FFB), but the Unicode standard (ch. 11.1 of Unicode 4.1) warns against using ideographic description sequences as an alternate representation for previously encoded characters:

This process is different from a formal encoding of an ideograph. There is no canonical description of unencoded ideographs; there is no semantic assigned to described ideographs; there is no equivalence defined for described ideographs. Conceptually, ideograph descriptions are more akin to the English phrase, “an ‘e’ with an acute accent on it,” than to the character sequence <U+006E, U+0301> [sic; 'e' should be U+0065].

Ligatures

Many scripts, including Arabic and Devanagari, have special orthographic rules which require that certain combinations of letterforms be combined into special ligature forms. The rules governing ligature formation can be quite complex, requiring special script-shaping technologies such as ACE (Arabic Calligraphic Engine by DecoType in the 1980s and used to generate all the Arabic examples in the printed editions of the Unicode Standard) which became the proof of concept for OpenType (by Adobe and Microsoft), Graphite (by SIL International), or AAT (by Apple). Instructions are also embedded in fonts to tell the operating system how to properly output different character sequences. A simple solution to the placement of combining marks or diacritics is assigning the marks a width of zero and placing the glyph itself to the left or right of the left sidebearing (depending on the direction of the script they are intended to be used with). A mark handled this way will appear over whatever character precedes it, but will not adjust its position relative to the width or height of the base glyph; it may be visually awkward and it may overlap some glyphs. Real stacking is impossible, but can be approximated in limited cases (for example, Thai top-combining vowels and tone marks can just be at different heights to start with). Generally this approach is only effective in monospaced fonts but can also be used as a fallback rendering method when more complex methods fail.

As of 2004, most software still cannot reliably handle many features not supported by older font formats, so combining characters generally will not work correctly. For example, ḗ (precomposed e with macron and acute above) and ḗ (e followed by the combining macron above and combining acute above) should be rendered identically, both appearing as an e with a macron and acute accent, but in practice, their appearance can vary greatly across software applications. Similarly, underdots, as needed in the romanization of Indic, will often be placed incorrectly. As a workaround, Unicode characters that map to precomposed glyphs can be used for many such characters. The need for such alternatives inherits from the limitations of fonts and rendering technology, not weaknesses of Unicode itself.

Standardized subsets

Several subsets of Unicode are standardized: Microsoft Windows since Windows NT 4.0 supports WGL-4 with 652 characters, which is considered to support all contemporary European languages using the Latin, Greek or Cyrillic script. Other standardized subsets of Unicode include the Multilingual European Subsets:[11] MES-1 (Latin scripts only, 335 characters), MES-2 (Latin, Greek and Cyrillic 1062 characters)[12] and MES-3A & MES-3B (two larger subsets, not shown here). Note that MES-2 includes every character in MES-1 and WGL-4.

WGL-4, MES-1 and MES-2
Row Cells Range(s)
00 20–7E Basic Latin (00–7F)
A0–FF Latin-1 Supplement (80–FF)
01 00–13, 14–15, 16–2B, 2C–2D, 2E–4D, 4E–4F, 50–7E, 7F Latin Extended-A (00–7F)
8F, 92, B7, DE-EF, FA–FF Latin Extended-B (80–FF )
02 18–1B, 1E–1F Latin Extended-B ( 00–4F)
59, 7C, 92 IPA Extensions (50–AF)
BB–BD, C6, C7, C9, D6, D8–DB, DC, DD, DF, EE Spacing Modifier Letters (B0–FF)
03 74–75, 7A, 7E, 84–8A, 8C, 8E–A1, A3–CE, D7, DA–E1 Greek (70–FF)
04 00, 01–0C, 0D, 0E–4F, 50, 51–5C, 5D, 5E–5F, 90–91, 92–C4, C7–C8, CB–CC, D0–EB, EE–F5, F8–F9 Cyrillic (00–FF)
1E 02–03, 0A–0B, 1E–1F, 40–41, 56–57, 60–61, 6A–6B, 80–85, 9B, F2–F3 Latin Extended Additional (00–FF)
1F 00–15, 18–1D, 20–45, 48–4D, 50–57, 59, 5B, 5D, 5F–7D, 80–B4, B6–C4, C6–D3, D6–DB, DD–EF, F2–F4, F6–FE Greek Extended (00–FF)
20 13–14, 15, 17, 18–19, 1A–1B, 1C–1D, 1E, 20–22, 26, 30, 32–33, 39–3A, 3C, 3E General Punctuation (00–6F)
44, 4A, 7F, 82 Superscripts and Subscripts (70–9F)
A3–A4, A7, AC, AF Currency Symbols (A0–CF)
21 05, 13, 16, 22, 26, 2E Letterlike Symbols (00–4F)
5B–5E Number Forms (50–8F)
90–93, 94–95, A8 Arrows (90–FF)
22 00, 02, 03, 06, 08-09, 0F, 11–12, 15, 19–1A, 1E–1F, 27-28, 29, 2A, 2B, 48, 59, 60–61, 64–65, 82–83, 95, 97 Mathematical Operators (00–FF)
23 02, 0A, 20–21, 29–2A Miscellaneous Technical (00–FF)
25 00, 02, 0C, 10, 14, 18, 1C, 24, 2C, 34, 3C, 50–6C Box Drawing (00–7F)
80, 84, 88, 8C, 90–93 Block Elements (80–9F)
A0–A1, AA–AC, B2, BA, BC, C4, CA–CB, CF, D8–D9, E6 Geometric Shapes (A0–FF)
26 3A–3C, 40, 42, 60, 63, 65–66, 6A, 6B Miscellaneous Symbols (00–FF)
F0 (01–02) Private Use Area (00–FF …)
FB 01–02 Alphabetic Presentation Forms (00–4F)
FF FD Specials

Rendering software which cannot process a Unicode character appropriately most often display it as only an open rectangle, or the Unicode “replacement character” (U+FFFD, �), to indicate the position of the unrecognized character. Some systems have made attempts to provide more information about such characters. The Apple LastResort font will display a substitute glyph indicating the Unicode range of the character and the SIL Unicode fallback font will display a box showing the hexadecimal scalar value of the character.

Unicode in use

Operating systems

Unicode has become the dominant scheme for internal processing and sometimes storage (though a lot of text is still stored in legacy encodings) of text. Early adopters tended to use UCS-2 and later moved to UTF-16 (as this was the least disruptive way to add support for non-BMP characters). The best known such system is Windows NT (and its descendants, Windows 2000, Windows XP and Windows Vista), which uses Unicode as the sole internal character encoding. The Java and .NET bytecode environments, Mac OS X, and KDE also use it for internal representation.

UTF-8 (originally developed for Plan 9) has become the main storage encoding on most Unix-like operating systems (though others are also used by some libraries) because it is a relatively easy replacement for traditional extended ASCII character sets.

Multilingual text-rendering engines which use Unicode include Uniscribe for Microsoft Windows, ATSUI for Mac OS X and Pango, a free software engine used by GTK+ (and hence the GNOME desktop).

Input methods

Because keyboard layouts cannot have simple key combinations for all characters, several operating systems provide alternative input methods that allow access to the entire repertoire.

ISO 14755[13], which standardises methods for entering Unicode characters from their codepoints, specifies several methods. There is the Basic method, where a beginning sequence is followed by the hexadecimal representation of the codepoint and the ending sequence. There is also a screen-selection entry method specified, where the characters are listed in a table in a screen, such as with a character map program.

E-mail

MIME defines two different mechanisms for encoding non-ASCII characters in e-mail, depending on whether the characters are in e-mail headers such as the "Subject:" or in the text body of the message. In both cases, the original character set is identified as well as a transfer encoding. For e-mail transmission of Unicode the UTF-8 character set and the Base64 transfer encoding are recommended. The details of the two different mechanisms are specified in the MIME standards and are generally hidden from users of e-mail software.

The adoption of Unicode in e-mail has been very slow. Some East-Asian text is still encoded in encodings such as ISO-2022, and some devices, such as cell phones, still cannot handle Unicode data correctly. Support has been improving however. Many major free mail providers such as Google (gmail), Microsoft (Hotmail) support it. The notable exception is Yahoo.

Web

All W3C recommendations have used Unicode as their document character set since HTML 4.0. Web browsers have supported Unicode, especially UTF-8, for many years. Display problems result primarily from font related issues; in particular versions of Microsoft Internet Explorer up to version 6 do not render many code points unless explicitly told to use a font that contains them.[14]

Although syntax rules may affect the order in which characters are allowed to appear, both HTML 4 and XML (including XHTML) documents, by definition, comprise characters from most of the Unicode code points, with the exception of:

  • most of the C0 and C1 control codes
  • the permanently-unassigned code points D800–DFFF
  • any code point ending in FFFE or FFFF

These characters manifest either directly as bytes according to document's encoding, if the encoding supports them, or users may write them as numeric character references based on the character's Unicode code point. For example, the references &#916;, &#1049;, &#1511;, &#1605;, &#3671;, &#12354;, &#21494;, &#33865;, and &#47568; (or the same numeric values expressed in hexadecimal, with &#x as the prefix) display on browsers as Δ, Й, ק, م, ๗, あ, 叶, 葉, and 말.

When specifying URIs, for example as URLs in HTTP requests, non-ASCII characters must be percent-encoded.

Fonts

Free and retail fonts based on Unicode are commonly available, since TrueType and OpenType support Unicode. These font formats map Unicode code points to glyphs.

Thousands of fonts exist on the market, but fewer than a dozen fonts — sometimes described as "pan-Unicode" fonts — attempt to support the majority of Unicode's character repertoire. Instead, Unicode-based fonts typically focus on supporting only basic ASCII and particular scripts or sets of characters or symbols. Several reasons justify this approach: applications and documents rarely need to render characters from more than one or two writing systems; fonts tend to demand resources in computing environments; and operating systems and applications show increasing intelligence in regard to obtaining glyph information from separate font files as needed, i.e. font substitution. Furthermore, designing a consistent set of rendering instructions for tens of thousands of glyphs constitutes a monumental task; such a venture passes the point of diminishing returns for most typefaces.

Issues

Philosophical and completeness criticisms

Han unification (the identification of forms in the three East Asian languages which one can treat as stylistic variations of the same historical character) has become one of the most controversial aspects of Unicode, despite the presence of a majority of experts from all three regions in the Ideographic Rapporteur Group (IRG), which advises the Consortium and ISO on additions to the repertoire and on Han unification.[15]

Unicode has been criticized for failing to allow for older and alternative forms of kanji which, critics argue, complicates the processing of ancient Japanese and uncommon Japanese names, although it follows the recommendations of Japanese language scholars and of the Japanese government and contains all of the same characters as previous widely used encoding standards.[16] There have been several attempts to create alternative encodings that preserve the minor, stylistic differences between Chinese, Japanese, and Korean characters in opposition to Unicode's policy of Han unification. Among them are TRON (although it is not widely adopted in Japan, there are some users who need to handle historical Japanese text and favor it), and UTF-2000.

Many older forms were not included in early versions of the Unicode standard, but Unicode 4.0 contains more than 70,000 Han characters and work continues on adding characters from the early literature of China, Korea, and Japan. Some argue, however, that this is not satisfactory, pointing out as an example the need to create new characters, representing words in various Chinese dialects, more of which may be invented in the future.

Despite these problems, the official encoding of China, GB-18030, supports the full range of characters in Unicode.

Mapping to legacy character sets

Injective mappings must be provided between characters in existing legacy character sets and characters in Unicode to facilitate conversion to Unicode and allow interoperability with legacy software. Lack of consistency in various mappings between earlier Japanese encodings such as Shift-JIS or EUC-JP and Unicode led to round-trip format conversion mismatches, particularly the mapping of the character JIS X 201 '~' (1-33, WAVE DASH), heavily used in legacy database data, to either '~' U+FF5E FULLWIDTH TILDE (in Microsoft Windows) or '〜' U+301C WAVE DASH (other vendors).[17]

Some Japanese computer programmers objected to Unicode because it requires them to separate the use of '\' U+005C REVERSE SOLIDUS (backslash) and '¥' U+00A5 YEN SIGN, which was mapped to 0x5C in JIS X 0201, and there is a lot of legacy code with this usage.[18] (This encoding also replaces tilde '~' 0x7E with overline '¯', now 0xAF.) The separation of these characters exists in ISO 8859-1, from long before Unicode.

Indic scripts

Thai alphabet support has been criticized for its illogical ordering of Thai characters. The vowels เ, แ, โ, ใ, ไ that are written to the left of the preceding consonant are in visual order instead of logical order, unlike the Unicode representations of other Indic scripts. This complication is due to Unicode inheriting the Thai Industrial Standard 620, which worked in the same way. This ordering problem complicates the Unicode collation process slightly, requiring table lookups to reorder Thai characters for collation.[16]

Indic scripts such as Tamil and Devanagari are each allocated only 128 code points, matching the ISCII standard. The correct rendering of Unicode Indic text requires transforming the stored logical order characters into visual order and the forming of ligatures out of components. Some local scholars argued in favor of assignments of Unicode codepoints to these ligatures, going against the practice for other writing systems, though Unicode contains some Arabic and other ligatures for back compatibility purposes only.[19][20][21] Encoding of any new ligatures in Unicode will not happen, in part because the set of ligatures is font-dependent, and Unicode is an encoding independent of font variations. The same kind of issue arose for Tibetan script (the Chinese National Standard organization failed to achieve a similar change).

See also

Notes

References

  • The Unicode Standard, Version 5.0, Fifth Edition, The Unicode Consortium, Addison-Wesley Professional, 27 October 2006. ISBN 0-321-48091-0
  • The Unicode Standard, Version 4.0, The Unicode Consortium, Addison-Wesley Professional, 27 August 2003. ISBN 0-321-18578-1
  • The Complete Manual of Typography, James Felici, Adobe Press; 1st edition, 2002. ISBN 0-321-12730-7
  • Unicode: A Primer, Tony Graham, M&T books, 2000. ISBN 0-7645-4625-2.
  • Unicode Demystified: A Practical Programmer's Guide to the Encoding Standard, Richard Gillam, Addison-Wesley Professional; 1st edition, 2002. ISBN 0-201-70052-2
  • Unicode Explained, Jukka K. Korpela, O'Reilly; 1st edition, 2006. ISBN 0-596-10121-X

Template:Link FA