Unicode, formallyThe Unicode Standard,[note 1] is acharacter encoding standard maintained by theUnicode Consortium designed to support the use of text in all of the world'swriting systems that can be digitized. Version 16.0 of the standard[A] defines154998characters and 168scripts[3] used in various ordinary, literary, academic, and technical contexts.
Many common characters, including numerals, punctuation, and other symbols, are unified within the standard and are not treated as specific to any given writing system. Unicode encodes 3790emoji, with the continued development thereof conducted by the Consortium as a part of the standard.[4] Moreover, the widespread adoption of Unicode was in large part responsible for the initial popularization of emoji outside of Japan. Unicode is ultimately capable of encoding more than 1.1 million characters.
Unicode has largely supplanted the previous environment of a myriad of incompatiblecharacter sets, each used within different locales and on different computer architectures. Unicode is used to encode the vast majority of text on the Internet, including mostweb pages, and relevant Unicode support has become a common consideration in contemporary software development.
The Unicodecharacter repertoire is synchronized withISO/IEC 10646, each being code-for-code identical with one another. However,The Unicode Standard is more than just a repertoire within which characters are assigned. To aid developers and designers, the standard also provides charts and reference data, as well as annexes explaining concepts germane to various scripts, providing guidance for their implementation. Topics covered by these annexes includecharacter normalization,character composition and decomposition,collation, anddirectionality.[5]
Unicode text is processed and stored as binary datausing one of several encodings, which define how to translate the standard's abstracted codes for characters into sequences of bytes.The Unicode Standard itself defines three encodings:UTF-8,UTF-16, andUTF-32, though several others exist. Of these, UTF-8 is the most widely used by a large margin, in part due to its backwards-compatibility withASCII.
Unicode was originally designed with the intent of transcending limitations present in all text encodings designed up to that point: each encoding was relied upon for use in its own context, but with no particular expectation of compatibility with any other. Indeed, any two encodings chosen were often totally unworkable when used together, with text encoded in oneinterpreted as garbage characters by the other. Most encodings had only been designed to facilitate interoperation between a handful of scripts—often primarily between a given script andLatin characters—not between a large number of scripts, and not with all of the scripts supported being treated in a consistent manner.
The philosophy that underpins Unicode seeks to encode the underlying characters—graphemes and grapheme-like units—rather than graphical distinctions considered mere variantglyphs thereof, that are instead best handled by thetypeface, through the use ofmarkup, or by some other means. In particularly complex cases, such asthe treatment of orthographical variants in Han characters, there is considerable disagreement regarding which differences justify their own encodings, and which are only graphical variants of other characters.
At the most abstract level, Unicode assigns a unique number called acode point to each character. Many issues of visual representation—including size, shape, and style—are intended to be up to the discretion of the software actually rendering the text, such as aweb browser orword processor. However, partially with the intent of encouraging rapid adoption, the simplicity of this original model has become somewhat more elaborate over time, and various pragmatic concessions have been made over the course of the standard's development.
The first 256 code points mirror theISO/IEC 8859-1 standard, with the intent of trivializing the conversion of text already written in Western European scripts. To preserve the distinctions made by different legacy encodings, therefore allowing for conversion between them and Unicode without any loss of information, manycharacters nearly identical to others, in both appearance and intended function, were given distinct code points. For example, theHalfwidth and Fullwidth Forms block encompasses a full semantic duplicate of the Latin alphabet, because legacyCJK encodings contained both "fullwidth" (matching the width of CJK characters) and "halfwidth" (matching ordinary Latin script) characters.
The Unicode Bulldog Award is given to people deemed to be influential in Unicode's development, with recipients includingTatsuo Kobayashi, Thomas Milo, Roozbeh Pournader,Ken Lunde, andMichael Everson.[6]
The origins of Unicode can be traced back to the 1980s, to a group of individuals with connections toXerox'sCharacter Code Standard (XCCS).[7] In 1987, Xerox employeeJoe Becker, along withApple employeesLee Collins andMark Davis, started investigating the practicalities of creating a universal character set.[8] With additional input from Peter Fenwick andDave Opstad,[7] Becker published a draft proposal for an "international/multilingual text character encoding system in August 1988, tentatively called Unicode". He explained that "the name 'Unicode' is intended to suggest a unique, unified, universal encoding".[7]
In this document, entitledUnicode 88, Becker outlined a scheme using16-bit characters:[7]
Unicode is intended to address the need for a workable, reliable world text encoding. Unicode could be roughly described as "wide-bodyASCII" that has been stretched to 16 bits to encompass the characters of all the world's living languages. In a properly engineered design, 16 bits per character are more than sufficient for this purpose.
This design decision was made based on the assumption that only scripts and characters in "modern" use would require encoding:[7]
Unicode gives higher priority to ensuring utility for the future than to preserving past antiquities. Unicode aims in the first instance at the characters published in the modern text (e.g. in the union of all newspapers and magazines printed in the world in 1988), whose number is undoubtedly far below 214 = 16,384. Beyond those modern-use characters, all others may be defined to be obsolete or rare; these are better candidates for private use registration than for congesting the public list of generally useful Unicode.
In early 1989, the Unicode working group expanded to include Ken Whistler and Mike Kernaghan of Metaphor, Karen Smith-Yoshimura and Joan Aliprand ofResearch Libraries Group, and Glenn Wright ofSun Microsystems. In 1990, Michel Suignard and Asmus Freytag ofMicrosoft andNeXT's Rick McGowan had also joined the group. By the end of 1990, most of the work of remapping existing standards had been completed, and a final review draft of Unicode was ready.
TheUnicode Consortium was incorporated in California on 3 January 1991,[9] and the first volume ofThe Unicode Standard was published that October. The second volume, now adding Han ideographs, was published in June 1992.
In 1996, a surrogate character mechanism was implemented in Unicode 2.0, so that Unicode was no longer restricted to 16 bits. This increased the Unicode codespace to over a million code points, which allowed for the encoding of many historic scripts, such asEgyptian hieroglyphs, and thousands of rarely used or obsolete characters that had not been anticipated for inclusion in the standard. Among these characters are various rarely usedCJK characters—many mainly being used in proper names, making them far more necessary for a universal encoding than the original Unicode architecture envisioned.[10]
Version 1.0 of Microsoft's TrueType specification, published in 1992, used the name "Apple Unicode" instead of "Unicode" for the Platform ID in the naming table.
The Unicode Consortium is a nonprofit organization that coordinates Unicode's development. Full members include most of the main computer software and hardware companies (and few others) with any interest in text-processing standards, includingAdobe,Apple,Google,IBM,Meta (previously as Facebook),Microsoft,Netflix, andSAP.[11]
Over the years several countries or government agencies have been members of the Unicode Consortium.[11]
The Consortium 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 withmultilingual environments.
Many modern applications can render a substantial subset of the manyscripts in Unicode, as demonstrated by this screenshot from theOpenOffice.org application.
As of 2024[update], a total of 168scripts[14] are included in the latest version of Unicode (coveringalphabets,abugidas andsyllabaries), although there are still scripts that are not yet encoded, particularly those mainly used in historical, liturgical, and academic contexts. Further additions of characters to the already encoded scripts, as well as symbols, in particular for mathematics andmusic (in the form of notes and rhythmic symbols), also occur.
The Unicode Roadmap Committee (Michael Everson, Rick McGowan, Ken Whistler, V.S. Umamaheswaran)[15] maintain the list of scripts that are candidates or potential candidates for encoding and their tentative code block assignments on the Unicode Roadmap[16] page of theUnicode Consortium website. For some scripts on the Roadmap, such asJurchen andKhitan large script, encoding proposals have been made and they are working their way through the approval process. For other scripts, such asNumidian andRongorongo, no proposal has yet been made, and they await agreement on character repertoire and other details from the user communities involved.
Some modern invented scripts which have not yet been included in Unicode (e.g.,Tengwar) or which do not qualify for inclusion in Unicode due to lack of real-world use (e.g.,Klingon) are listed in theConScript Unicode Registry, along with unofficial but widely usedprivate use area code assignments.
There is also aMedieval Unicode Font Initiative focused on special Latin medieval characters. Part of these proposals has been already included in Unicode.
The Script Encoding Initiative,[17] a project run by Deborah Anderson at theUniversity of California, Berkeley was founded in 2002 with the goal of funding proposals for scripts not yet encoded in the standard. The project has become a major source of proposed additions to the standard in recent years.[18]
The Unicode Consortium together with the ISO have developed a sharedrepertoire following the initial publication ofThe Unicode Standard: Unicode and the ISO'sUniversal Coded Character Set (UCS) use identical character names and code points. However, the Unicode versions do differ from their ISO equivalents in two significant ways.
While the UCS is a simple character map, Unicode specifies the rules, algorithms, and properties necessary to achieve interoperability between different platforms and languages. Thus,The Unicode Standard includes more information, covering in-depth topics such as bitwise encoding,collation, and rendering. It also provides a comprehensive catalog of character properties, including those needed for supportingbidirectional text, as well as visual charts and reference data sets to aid implementers. Previously,The Unicode Standard was sold as a print volume containing the complete core specification, standard annexes,[note 2] and code charts. However, version 5.0, published in 2006, was the last version printed this way. Starting with version 5.2, only the core specification, published as a print-on-demand paperback, may be purchased.[19] The full text, on the other hand, is published as a free PDF on the Unicode website.
A practical reason for this publication method highlights the second significant difference between the UCS and Unicode—the frequency with which updated versions are released and new characters added.The Unicode Standard has regularly released annual expanded versions, occasionally with more than one version released in a calendar year and with rare cases where the scheduled release had to be postponed. For instance, in April 2020, a month after version 13.0 was published, the Unicode Consortium announced they had changed the intended release date for version 14.0, pushing it back six months to September 2021 due to theCOVID-19 pandemic.
Thus far, the following versions ofThe Unicode Standard have been published. Update versions, which do not include any changes to character repertoire, are signified by the third number (e.g., "version 4.0.1") and are omitted in the table below.[21]
Unicode version history and notable changes to characters and scripts
Original set of Hangul syllables removed, new set of 11,172 Hangul syllables added at new location, Tibetan added back in a new location and with a different character repertoire, Surrogate character mechanism defined, Plane 15 and Plane 16private use area allocated
Elymaic,Nandinagari,Nyiakeng Puachue Hmong,Wancho,Miao script, hiragana and katakana small letters, Tamil historic fractions and symbols, Lao letters forPali, Latin letters for Egyptological and Ugaritic transliteration, hieroglyph format controls, 61 emoji
Chorasmian,Dhives Akuru,Khitan small script,Yezidi, 4,969 CJK ideographs, Arabic script additions used to writeHausa,Wolof, and other African languages, additions used to writeHindko andPunjabi in Pakistan, Bopomofo additions used for Cantonese, Creative Commons license symbols, graphic characters for compatibility with teletext and home computer systems, 55 emoji
Toto,Cypro-Minoan,Vithkuqi,Old Uyghur,Tangsa, extended IPA, Arabic script additions for use in languages across Africa and in Iran, Pakistan, Malaysia, Indonesia, Java, and Bosnia, additions for honorifics and Quranic use, additions to support languages in North America, the Philippines, India, and Mongolia,U+20C0⃀SOM SIGN,Znamenny musical notation, 37 emoji
7.0 added Amendments 1 and 2 as well as theruble sign
^Plus Amendment 1, as well as theLari sign, nine CJK unified ideographs, and 41 emoji;[44] 9.0 added Amendment 2, as well as Adlam, Newa, Japanese TV symbols, and 74 emoji and symbols.[45]
The Unicode Consortium normally releases a new version ofThe Unicode Standard once a year. Version 17.0, the next major version, is projected to include 4301 new unifiedCJK characters.[58][59]
The Unicode Standard defines acodespace:[60] a sequence of integers calledcode points[61] in the range from 0 to1114111, notated according to the standard asU+0000–U+10FFFF.[62] The codespace is a systematic, architecture-independent representation ofThe Unicode Standard; actual text is processed as binary data via one of several Unicode encodings, such asUTF-8.
In this normative notation, the two-character prefixU+ always precedes a written code point,[63] and the code points themselves are written ashexadecimal numbers. At least four hexadecimal digits are always written, withleading zeros prepended as needed. For example, the code pointU+00F7÷DIVISION SIGN is padded with two leading zeros, butU+13254𓉔EGYPTIAN HIEROGLYPH O004 () is not padded.[64]
There are a total of1112064 valid code points within the codespace.[65] This number arises from the limitations of theUTF-16 character encoding, which can encode the 216 code points in the rangeU+0000 throughU+FFFF except for the 211 code points in the rangeU+D800 throughU+DFFF, which are used as surrogate pairs to encode the 220 code points in the rangeU+10000 throughU+10FFFF.
The Unicode codespace is divided into 17planes, numbered 0 to 16. Plane 0 is theBasic Multilingual Plane (BMP), and contains the most commonly used characters. All code points in the BMP are accessed as a single code unit in UTF-16 encoding and can be encoded in one, two or three bytes in UTF-8. Code points in planes 1 through 16 (thesupplementary planes) are accessed as surrogate pairs inUTF-16 and encoded in four bytes inUTF-8.
Within each plane, characters are allocated within namedblocks of related characters. The size of a block is always a multiple of 16, and is often a multiple of 128, but is otherwise arbitrary. Characters required for a given script may be spread out over several different, potentially disjunct blocks within the codespace.
Each code point is assigned a classification, listed as the code point'sGeneral Category property. Here, at the uppermost level code points are categorized as one of Letter, Mark, Number, Punctuation, Symbol, Separator, or Other. Under each category, each code point is then further subcategorized. In most cases, other properties must be used to adequately describe all the characteristics of any given code point.
Includes spacingunderscore characters such as "_", and other spacingtie characters. Unlike other punctuation characters, these may be classified as "word" characters byregular expression libraries.[f]
Openingquotation mark. Does not include the ASCII "neutral" quotation mark. May behave like Ps or Pe depending on usage
Pf
Punctuation, final quote
Graphic
Character
10
Closing quotation mark. May behave like Ps or Pe depending on usage
Po
Punctuation, other
Graphic
Character
640
S, Symbol
Sm
Symbol, math
Graphic
Character
950
Mathematical symbols (e.g.,+,−,=,×,÷,√,∊,≠). Does not include parentheses and brackets, which are in categories Ps and Pe. Also does not include!,*,-, or/, which despite frequent use as mathematical operators, are primarily considered to be "punctuation".
^abcde"Table 4-9: Construction of Code Point Labels".The Unicode Standard. Unicode Consortium. September 2024. ACode Point Label may be used to identify a nameless code point. E.g. <control-hhhh>, <control-0088>. The Name remains blank, which can prevent inadvertently replacing, in documentation, a Control Name with a true Control code. Unicode also uses <not a character> for <noncharacter>.
The1024 points in the rangeU+D800–U+DBFF are known ashigh-surrogate code points, and code points in the rangeU+DC00–U+DFFF (1024 code points) are known aslow-surrogate code points. A high-surrogate code point followed by a low-surrogate code point forms asurrogate pair in UTF-16 in order to represent code points greater thanU+FFFF. In principle, these code points cannot otherwise be used, though in practice this rule is often ignored, especially when not using UTF-16.
A small set of code points are guaranteed never to be assigned to characters, although third-parties may make independent use of them at their discretion. There are 66 of thesenoncharacters:U+FDD0–U+FDEF and the last two code points in each of the 17 planes (e.g.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.[66] Like surrogates, the rule that these cannot be used is often ignored, although the operation of thebyte order mark assumes thatU+FFFE will never be the first code point in a text. The exclusion of surrogates and noncharacters leaves1111998 code points available for use.
Private use code points are considered to be assigned, but they intentionally have no interpretation specified byThe Unicode Standard[67] such that any interchange of such code points requires an independent agreement between the sender and receiver as to their interpretation. There are three private use areas in the Unicode codespace:
Private Use Area:U+E000–U+F8FF (6400 characters),
Supplementary Private Use Area-A:U+F0000–U+FFFFD (65534 characters),
Supplementary Private Use Area-B:U+100000–U+10FFFD (65534 characters).
Graphic characters are those defined byThe Unicode Standard to have particular semantics, either having a visibleglyph shape or representing a visible space. As of Unicode 16.0, there are154826 graphic characters.
Format characters are characters that do not have a visible appearance but may have an effect on the appearance or behavior of neighboring characters. For example,U+200CZERO WIDTH NON-JOINER andU+200DZERO WIDTH JOINER may be used to change the default shaping behavior of adjacent characters (e.g. to inhibit ligatures or request ligature formation). There are 172 format characters in Unicode 16.0.
65 code points, the rangesU+0000–U+001F andU+007F–U+009F, are reserved ascontrol codes, corresponding to theC0 and C1 control codes as defined inISO/IEC 6429.U+0089LINE TABULATION,U+008ALINE FEED, andU+000DCARRIAGE RETURN are widely used in texts using Unicode. In a phenomenon known asmojibake, the C1 code points are improperly decoded according to theWindows-1252 codepage, previously widely used in Western European contexts.
Together, graphic, format, control code, and private use characters are collectively referred to asassigned characters.Reserved code points are those code points that are valid and available for use, but have not yet been assigned. As of Unicode 15.1, there are819467 reserved code points.
The set of graphic and format characters defined by Unicode does not correspond directly to the repertoire ofabstract characters representable under Unicode. Unicode encodes characters by associating an abstract character with a particular code point.[68] 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, a Latin small letter "i" with anogonek, adot above, and anacute accent, which is required inLithuanian, is represented by the character sequenceU+012F;U+0307;U+0301. Unicode maintains a list of uniquely named character sequences for abstract characters that are not directly encoded in Unicode.[69]
All assigned characters have a unique and immutable name by which they are identified. This immutability has been guaranteed since version 2.0 ofThe Unicode Standard by its Name Stability policy.[66] In cases where a name is seriously defective and misleading, or has a serious typographical error, a formalalias may be defined that applications are encouraged to use in place of the official character name. For example,U+A015ꀕYI SYLLABLE WU has the formal aliasYI SYLLABLE ITERATION MARK, andU+FE18︘PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET (sic) has the formal aliasPRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRACKET.[70]
Unicode includes a mechanism for modifying characters that greatly extends the supported repertoire of glyphs. This covers the use ofcombining diacritical marks that may be added after the base character by the user. Multiple combining diacritics may be simultaneously applied to the same character. Unicode also containsprecomposed versions of most letter/diacritic combinations in normal use. These make the 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 asU+0065eLATIN SMALL LETTER E followed byU+0301◌́COMBINING ACUTE ACCENT), and equivalently as the precomposed characterU+00E9éLATIN SMALL LETTER E WITH ACUTE. Thus, users often have multiple equivalent ways of encoding the same character. The mechanism ofcanonical equivalence withinThe Unicode Standard ensures the practical interchangeability of these equivalent encodings.
An example of this arises with the Korean alphabetHangul: Unicode provides a mechanism for composing Hangul syllables from their individualHangul Jamo subcomponents. However, it also provides11172 combinations of precomposed syllables made from the most common jamo.
CJK characters presently only have codes for uncomposable radicals and precomposed forms. Most Han characters have either been intentionally composed from, or reconstructed as compositions of, simpler orthographic elements calledradicals, so in principle Unicode could have enabled their composition as it did with Hangul. While this could have greatly reduced the number of required code points, as well as allowing the algorithmic synthesis of many arbitrary new characters, the complexities of character etymologies and the post-hoc nature of radical systems add immense complexity to the proposal. Indeed, attempts to design CJK encodings on the basis of composing radicals have been met with difficulties resulting from the reality that Chinese characters do not decompose as simply or as regularly as Hangul does.
TheCJK Radicals Supplement block is assigned to the rangeU+2E80–U+2EFF, and theKangxi radicals are assigned toU+2F00–U+2FDF. TheIdeographic Description Sequences block covers the rangeU+2FF0–U+2FFB, butThe Unicode Standard warns against using its characters as an alternate representation for characters encoded elsewhere:
This process is different from a formalencoding 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, ideographic descriptions are more akin to the English phrase "an 'e' with an acute accent on it" than to the character sequence <U+0065, U+0301>.
Many scripts, includingArabic andDevanāgarī, have special orthographic rules that require certain combinations of letterforms to be combined into specialligature 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 ofThe Unicode Standard), which became theproof of concept forOpenType (by Adobe and Microsoft),Graphite (bySIL International), orAAT (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 may be used as a fallback rendering method when more complex methods fail.
Several subsets of Unicode are standardized: Microsoft Windows sinceWindows NT 4.0 supportsWGL-4 with 657 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:[72] MES-1 (Latin scripts only; 335 characters), MES-2 (Latin, Greek, and Cyrillic; 1062 characters)[73] and MES-3A & MES-3B (two larger subsets, not shown here). MES-2 includes every character in MES-1 and WGL-4.
The standardDIN 91379[74] specifies a subset of Unicode letters, special characters, and sequences of letters and diacritic signs to allow the correct representation of names and to simplify data exchange in Europe. This standard supports all of the official languages of all European Union countries, as well as the German minority languages and the official languages of Iceland, Liechtenstein, Norway, and Switzerland. To allow the transliteration of names in other writing systems to the Latin script according to the relevant ISO standards, all necessary combinations of base letters and diacritic signs are provided.
Rendering software that cannot process a Unicode character appropriately often displays it as an open rectangle, or asU+FFFD to indicate the position of the unrecognized character. Some systems have made attempts to provide more information about such characters. Apple'sLast Resort font will display a substitute glyph indicating the Unicode range of the character, and theSIL International'sUnicode fallback font will display a box showing the hexadecimal scalar value of the character.
Several mechanisms have been specified for storing a series of code points as a series of bytes.
Unicode defines two mapping methods: theUnicode Transformation Format (UTF) encodings, and theUniversal Coded Character Set (UCS) encodings. An encoding maps (possibly a subset of) the range of Unicodecode points to sequences of values in some fixed-size range, termedcode units. All UTF encodings map code points to a unique sequence of bytes.[75] The numbers in the names of the encodings indicate the number of bits per code unit (for UTF encodings) or the number of bytes per code unit (for UCS encodings andUTF-1). UTF-8 and UTF-16 are the most commonly used encodings.UCS-2 is an obsolete subset of UTF-16; UCS-4 and UTF-32 are functionally equivalent.
UTF-16, which uses one 16-bit unit per code point belowU+010000, and asurrogate pair of two 16-bit units per code point in the rangeU+010000 toU+10FFFF
UTF-EBCDIC, not specified as part ofThe Unicode Standard, which uses one to five 8-bit units per code point, intended to maximize compatibility withEBCDIC
UTF-8 uses one to four 8-bit units (bytes) per code point and, being compact for Latin scripts and ASCII-compatible, provides the de facto standard encoding for the interchange of Unicode text. It is used byFreeBSD and most recentLinux distributions as a direct replacement for legacy encodings in general text handling.
The UCS-2 and UTF-16 encodings specify the Unicodebyte order mark (BOM) for use at the beginnings of text files, which may be used for byte-order detection (orbyte endianness detection). The BOM, encoded asU+FEFFZERO WIDTH NO-BREAK SPACE, has the important property of unambiguity on byte reorder, regardless of the Unicode encoding used;U+FFFE (the result of byte-swappingU+FEFF) does not equate to a legal character, andU+FEFF in places other than the beginning of text conveys the zero-width non-break space.
The same character converted to UTF-8 becomes the byte sequenceEF BB BF.The Unicode Standard allows the BOM "can serve as a signature for UTF-8 encoded text where the character set is unmarked".[76] Some software developers have adopted it for other encodings, including UTF-8, in an attempt to distinguish UTF-8 from local 8-bitcode pages. HoweverRFC3629, the UTF-8 standard, recommends that byte order marks be forbidden in protocols using UTF-8, but discusses the cases where this may not be possible. In addition, the large restriction on possible patterns in UTF-8 (for instance there cannot be any lone bytes with the high bit set) means that it should be possible to distinguish UTF-8 from other character encodings without relying on the BOM.
In UTF-32 and UCS-4, one32-bit code unit serves as a fairly direct representation of any character's code point (although the endianness, which varies across different platforms, affects how the code unit manifests as a byte sequence). In the other encodings, each code point may be represented by a variable number of code units. UTF-32 is widely used as an internal representation of text in programs (as opposed to stored or transmitted text), since every Unix operating system that uses theGCC compilers to generate software uses it as the standard "wide character" encoding. Some programming languages, such asSeed7, use UTF-32 as an internal representation for strings and characters. Recent versions of thePython programming language (beginning with 2.2) may also be configured to use UTF-32 as the representation for Unicode strings, effectively disseminating such encoding inhigh-level coded software.
Punycode, another encoding form, enables the encoding of Unicode strings into the limited character set supported by theASCII-basedDomain Name System (DNS). The encoding is used as part ofIDNA, which is a system enabling the use ofInternationalized Domain Names in all scripts that are supported by Unicode. Earlier and now historical proposals includeUTF-5 andUTF-6.
Unicode, in the form ofUTF-8, has been the most common encoding for theWorld Wide Web since 2008.[77] It has near-universal adoption, and much of the non-UTF-8 content is found in other Unicode encodings, e.g.UTF-16. As of 2024[update], UTF-8 accounts for on average 98.3% of all web pages (and 983 of the top 1,000 highest-ranked web pages).[78] Although many pages only useASCII characters to display content, UTF-8 was designed with 8-bit ASCII as a subset and almost no websites now declare their encoding to only be ASCII instead of UTF-8.[79] Over a third of the languages tracked have 100% UTF-8 use.
Unicode has become the dominant scheme for the internal processing and storage of text. Although a great deal of text is still stored in legacy encodings, Unicode is used almost exclusively for building new information processing systems. Early adopters tended to useUCS-2 (the fixed-length two-byte obsolete precursor to UTF-16) and later moved toUTF-16 (the variable-length current standard), as this was the least disruptive way to add support for non-BMP characters. The best known such system isWindows NT (and its descendants,2000,XP,Vista,7,8,10, and11), which uses UTF-16 as the sole internal character encoding. TheJava and.NET bytecode environments,macOS, andKDE also use it for internal representation. Partial support for Unicode can be installed onWindows 9x through the Microsoft Layer for Unicode.
UTF-8 (originally developed forPlan 9)[82] has become the main storage encoding on mostUnix-like operating systems (though others are also used by some libraries) because it is a relatively easy replacement for traditionalextended ASCII character sets. UTF-8 is also the most common Unicode encoding used inHTML documents on theWorld Wide Web.
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/IEC 14755,[83] which standardises methods for entering Unicode characters from their code points, specifies several methods. There is theBasic method, where abeginning sequence is followed by the hexadecimal representation of the code point and theending sequence. There is also ascreen-selection entry method specified, where the characters are listed in a table on a screen, such as with a character map program.
Online tools for finding the code point for a known character include Unicode Lookup[84] by Jonathan Hedley and Shapecatcher[85] by Benjamin Milde. In Unicode Lookup, one enters a search key (e.g. "fractions"), and a list of corresponding characters with their code points is returned. In Shapecatcher, based onShape context, one draws the character in a box and a list of characters approximating the drawing, with their code points, is returned.
MIME defines two different mechanisms for encoding non-ASCII characters in email, depending on whether the characters are in email 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 email transmission of Unicode, theUTF-8 character set and theBase64 or theQuoted-printable transfer encoding are recommended, depending on whether much of the message consists ofASCII characters. The details of the two different mechanisms are specified in the MIME standards and generally are hidden from users of email software.
The IETF has defined[86][87] a framework for internationalized email using UTF-8, and has updated[88][89][90][91] several protocols in accordance with that framework.
The adoption of Unicode in email has been very slow.[citation needed] Some East Asian text is still encoded in encodings such asISO-2022, and some devices, such as mobile phones,[citation needed] still cannot correctly handle Unicode data. Support has been improving, however. Many major free mail providers such asYahoo! Mail,Gmail, andOutlook.com support it.
AllW3C recommendations have used Unicode as theirdocument character set since HTML 4.0.Web browsers have supported Unicode, especially UTF-8, for many years. There used to be display problems resulting primarily fromfont related issues; e.g. v6 and older of MicrosoftInternet Explorer did not render many code points unless explicitly told to use a font that contains them.[92]
Although syntax rules may affect the order in which characters are allowed to appear,XML (includingXHTML) documents, by definition,[93] comprise characters from most of the Unicode code points, with the exception of:
HTML characters manifest either directly asbytes according to the 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Δ,Й,ק,م,๗,あ,叶,葉, and말 (or the same numeric values expressed in hexadecimal, with&#x as the prefix) should display on all browsers as Δ, Й, ק ,م, ๗, あ, 叶, 葉, and 말.
Unicode is not in principle concerned with fontsper se, seeing them as implementation choices.[94] Any given character may have manyallographs, from the more common bold, italic and base letterforms to complex decorative styles. A font is "Unicode compliant" if the glyphs in the font can be accessed using code points defined inThe Unicode Standard.[95] The standard does not specify a minimum number of characters that must be included in the font; some fonts have quite a small repertoire.
Free and retailfonts based on Unicode are widely available, sinceTrueType andOpenType support Unicode (andWeb Open Font Format (WOFF andWOFF2) is based on those). These font formats map Unicode code points to glyphs, but OpenType and TrueType font files are restricted to 65,535 glyphs. Collection files provide a "gap mode" mechanism for overcoming this limit in a single font file. (Each font within the collection still has the 65,535 limit, however.) A TrueType Collection file would typically have a file extension of ".ttc".
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-basedfonts 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 ofdiminishing returns for most typefaces.
Unicode partially addresses thenewline problem that occurs when trying to read a text file on different platforms. Unicode defines a large number ofcharacters that conforming applications should recognize as line terminators.
In terms of the newline, Unicode introducedU+2028LINE SEPARATOR andU+2029PARAGRAPH SEPARATOR. This was an attempt to provide a Unicode solution to encoding paragraphs and lines semantically, potentially replacing all of the various platform solutions. In doing so, Unicode does provide a way around the historical platform-dependent solutions. Nonetheless, few if any Unicode solutions have adopted these Unicode line and paragraph separators as the sole canonical line ending characters. However, a common approach to solving this issue is through newline normalization. This is achieved with theCocoa text system inmacOS and also with W3C XML and HTML recommendations. In this approach, every possible newline character is converted internally to a common newline (which one does not really matter since it is an internal operation just for rendering). In other words, the text system can correctly treat the character as a newline, regardless of the input's actual encoding.
TheIdeographic Research Group (IRG) is tasked with advising the Consortium and ISO regarding Han unification, or Unihan, especially the further addition of CJK unified and compatibility ideographs to the repertoire. The IRG is composed of experts from each region that has historically usedChinese characters. However, despite the deliberation within the committee, Han unification has consistently been one of the most contested aspects ofThe Unicode Standard since the genesis of the project.[96]
Existing character set standards such as the JapaneseJIS X 0208 (encoded byShift JIS) defined unification criteria, meaning rules for determining when avariant Chinese character is to be considered a handwriting/font difference (and thus unified), versus a spelling difference (to be encoded separately). Unicode's character model for CJK characters was based on the unification criteria used by JIS X 0208, as well as those developed by the Association for a Common Chinese Code in China.[97]
Due to the standard's principle of encoding semantic instead of stylistic variants, Unicode has received criticism for not assigning code points to certain rare and archaickanji variants, possibly complicating processing of ancient and uncommon Japanese names. Since it places particular emphasis on Chinese, Japanese and Korean sharing many characters in common, Han unification is also sometimes perceived as treating the three as the same thing.[98] Regional differences in the expected forms of characters, in terms of typographical conventions and curricula for handwriting, do not always fall along language boundaries: althoughHong Kong andTaiwan both writeChinese languages usingTraditional Chinese characters, the preferred forms of characters differ between Hong Kong and Taiwan in some cases.[99]
Less-frequently-used alternative encodings exist, often predating Unicode, with character models differing from this paradigm, aimed at preserving the various stylistic differences between regional and/or nonstandard character forms. One example is theTRON Code favored by some users for handling historical Japanese text, though not widely adopted among the Japanese public. Another is theCCCII encoding adopted by library systems inHong Kong,Taiwan and theUnited States. These have their own drawbacks in general use, leading to theBig5 encoding (introduced in 1984, four years after CCCII) having become more common than CCCII outside of library systems.[100] Although work atApple based onResearch Libraries Group's CJK Thesaurus, which was used to maintain the EACC variant of CCCII, was one of the direct predecessors of Unicode'sUnihan set, Unicode adopted the JIS-style unification model.[97]
The earliest version of Unicode had a repertoire of fewer than 21,000 Han characters, largely limited to those in relatively common modern usage. As of version 16.0, the standard now encodes more than 97,000 Han characters, and work is continuing to add thousands more—largely historical and dialectal variant characters used throughout theSinosphere.
Modern typefaces provide a means to address some of the practical issues in depicting unified Han characters with various regional graphical representations. The 'locl'OpenType table allows a renderer to select a different glyph for each code point based on the text locale.[101] TheUnicode variation sequences can also provide in-text annotations for a desired glyph selection; this requires registration of the specific variant in theIdeographic Variation Database.
VariousCyrillic characters shown with upright, oblique, and italic alternate forms
If the appropriate glyphs for characters in the same script differ only in the italic, Unicode has generally unified them, as can be seen in the comparison among a set of seven characters' italic glyphs as typically appearing in Russian, traditional Bulgarian, Macedonian, and Serbian texts at right, meaning that the differences are displayed through smart font technology or manually changing fonts. The same OpenType 'locl' technique is used.[102]
For use in theTurkish alphabet andAzeri alphabet, Unicode includes a separatedotless lowercaseI (ı) and adotted uppercaseI (İ). However, the usual ASCII letters are used for the lowercase dottedI and the uppercase dotlessI, matching how they are handled in the earlierISO 8859-9. As such, case-insensitive comparisons for those languages have to use different rules than case-insensitive comparisons for other languages using the Latin script.[103][104] This can have security implications if, for example,sanitization code oraccess control relies on case-insensitive comparison.[104]
By contrast, theIcelandic eth (ð), thebarred D (đ) and theretroflex D (ɖ), which usually[note 4] look the same in uppercase (Đ), are given the opposite treatment, and encoded separately in both letter-cases (in contrast to the earlierISO 6937, which unifies the uppercase forms). Although it allows for case-insensitive comparison without needing to know the language of the text, this approach also has issues, requiring security measures relating tohomoglyph attacks.[105]
Unicode has a large number ofhomoglyphs, many of which look very similar or identical to ASCII letters. Substitution of these can make an identifier or URL that looks correct, but directs to a different location than expected.[106] Additionally, homoglyphs can also be used for manipulating the output ofnatural language processing (NLP) systems.[107] Mitigation requires disallowing these characters, displaying them differently, or requiring that they resolve to the same identifier;[108] all of this is complicated due to the huge and constantly changing set of characters.[109][110]
A security advisory was released in 2021 by two researchers, one from theUniversity of Cambridge and the other from theUniversity of Edinburgh, in which they assert that theBiDi marks can be used to make large sections of code do something different from what they appear to do. The problem was named "Trojan Source".[111] In response, code editors started highlighting marks to indicate forced text-direction changes.[112]
TheUTF-8 andUTF-16 encodings do not accept all possible sequences of code units. Implementations vary in what they do when reading an invalid sequence, which has led to security bugs.[113][114]
Unicode was designed to provide code-point-by-code-pointround-trip format conversion to and from any preexisting character encodings, so that text files in older character sets can be converted to Unicode and then back and get back the same file, without employing context-dependent interpretation. That has meant that inconsistent legacy architectures, such ascombining diacritics andprecomposed characters, both exist in Unicode, giving more than one method of representing some text. This is most pronounced in the three different encoding forms for KoreanHangul. Since version 3.0, any precomposed characters that can be represented by a combined sequence of already existing characters can no longer be added to the standard to preserve interoperability between software using different versions of Unicode.
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 asShift-JIS orEUC-JP and Unicode led toround-trip format conversion mismatches, particularly the mapping of the character JIS X 0208 '~' (1-33, WAVE DASH), heavily used in legacy database data, to eitherU+FF5E~FULLWIDTH TILDE (inMicrosoft Windows) orU+301C〜WAVE DASH (other vendors).[115]
Some Japanese computer programmers objected to Unicode because it requires them to separate the use ofU+005C\REVERSE SOLIDUS (backslash) andU+00A5¥YEN SIGN, which was mapped to 0x5C in JIS X 0201, and a lot of legacy code exists with this usage.[116] (This encoding also replaces tilde '~' 0x7E with macron '¯', now 0xAF.) The separation of these characters exists inISO 8859-1, from long before Unicode.
Indic scripts such asTamil andDevanagari are each allocated only 128 code points, matching theISCII standard. The correct rendering of Unicode Indic text requires transforming the stored logical order characters into visual order and the forming of ligatures (also known as conjuncts) out of components. Some local scholars argued in favor of assignments of Unicode code points to these ligatures, going against the practice for other writing systems, though Unicode contains some Arabic and other ligatures for backward compatibility purposes only.[117][118][119] 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 theTibetan script in 2003 when theStandardization Administration of China proposed encoding 956 precomposed Tibetan syllables,[120] but these were rejected for encoding by the relevant ISO committee (ISO/IEC JTC 1/SC 2).[121]
Thai alphabet support has been criticized for its ordering of Thai characters. The vowels เ, แ, โ, ใ, ไ that are written to the left of the preceding consonant are in visual order instead of phonetic order, unlike the Unicode representations of other Indic scripts. This complication is due to Unicode inheriting theThai Industrial Standard 620, which worked in the same way, and was the way in which Thai had always been written on keyboards. This ordering problem complicates the Unicode collation process slightly, requiring table lookups to reorder Thai characters for collation.[98] Even if Unicode had adopted encoding according to spoken order, it would still be problematic to collate words in dictionary order. E.g., the wordแสดง[sadɛːŋ] "perform" starts with a consonant cluster "สด" (with an inherent vowel for the consonant "ส"), the vowel แ-, in spoken order would come after the ด, but in a dictionary, the word is collated as it is written, with the vowel following the ส.
Characters with diacritical marks can generally be represented either as a single precomposed character or as a decomposed sequence of a base letter plus one or more non-spacing marks. 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 ane with amacron (◌̄) andacute accent (◌́), but in practice, their appearance may vary depending upon what rendering engine and fonts are being used to display the characters. Similarly,underdots, as needed in theromanization ofIndic languages, will often be placed incorrectly.[citation needed] Unicode characters that map to precomposed glyphs can be used in many cases, thus avoiding the problem, but where no precomposed character has been encoded, the problem can often be solved by using a specialist Unicode font such asCharis SIL that usesGraphite,OpenType ('gsub'), orAAT technologies for advanced rendering features.
The Unicode Standard has imposed rules intended to guarantee stability.[122] Depending on the strictness of a rule, a change can be prohibited or allowed. For example, a "name" given to a code point cannot and will not change. But a "script" property is more flexible, by Unicode's own rules. In version 2.0, Unicode changed many code point "names" from version 1. At the same moment, Unicode stated that, thenceforth, an assigned name to a code point would never change. This implies that when mistakes are published, these mistakes cannot be corrected, even if they are trivial (as happened in one instance with the spellingBRAKCET forBRACKET in a character name). In 2006 a list of anomalies in character names was first published, and, as of June 2021, there were 104 characters with identified issues,[123] for example:
U+2118℘SCRIPT CAPITAL P: This is a small letter. The capital isU+1D4AB𝒫MATHEMATICAL SCRIPT CAPITAL P.[124]
U+A015ꀕYI SYLLABLE WU: This is not a Yi syllable, but a Yi iteration mark.
U+FE18︘PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRAKCET:bracket is spelled incorrectly.[125] (Spelling errors are resolved by usingUnicode alias names.)
While Unicode defines the script designator (name) to be "Phags_Pa", in that script's character names, a hyphen is added:U+A840ꡀPHAGS-PA LETTER KA.[126][127] This, however, is not an anomaly, but the rule: hyphens are replaced by underscores in script designators.[126]
^"A Unicode Standard Annex (UAX) forms an integral part ofThe Unicode Standard, but is published as a separate document."[1]
^acode point is an abstract representation of an UCS character by an integer between 0 and 1,114,111 (1,114,112 = 220 + 216 or 17 × 216 = 0x110000 code points)
^Rarely, the uppercase Icelandic eth may instead be written in aninsular style (Ꝺ) with the crossbar positioned on the stem, particularly if it needs to be distinguished from the uppercase retroflex D (seeAfrican Reference Alphabet).
^abcdeBecker, Joseph D. (1998-09-10) [1988-08-29]."Unicode 88"(PDF).Unicode Consortium.Archived(PDF) from the original on 2016-11-25. Retrieved2016-10-25.In 1978, the initial proposal for a set of "Universal Signs" was made byBob Belleville atXerox PARC. Many persons contributed ideas to the development of a new encoding design. Beginning in 1980, these efforts evolved into theXerox Character Code Standard (XCCS) by the present author, a multilingual encoding that has been maintained by Xerox as an internal corporate standard since 1982, through the efforts of Ed Smura, Ron Pellar, and others. Unicode arose as the result of eight years of working experience with XCCS. Its fundamental differences from XCCS were proposed by Peter Fenwick and Dave Opstad (pure 16-bit codes) and byLee Collins (ideographic character unification). Unicode retains the many features of XCCS whose utility has been proved over the years in an international line of communication multilingual system products.
^"Noto CJK fonts". Noto Fonts. 2023-02-18.Select this deployment format if your system supports variable fonts and you prefer to use only one language, but also want full character coverage or the ability to language-tag text to use glyphs that are appropriate for the other languages (this requires an app that supports language tagging and the OpenType 'locl' GSUB feature).
Unicode Demystified: A Practical Programmer's Guide to the Encoding Standard, Richard Gillam, Addison-Wesley Professional; 1st edition, 2002.ISBN0-201-70052-2
Unicode Explained, Jukka K. Korpela, O'Reilly; 1st edition, 2006.ISBN0-596-10121-X
Alan Wood's Unicode Resources – contains lists of word processors with Unicode capability; fonts and characters are grouped by type; characters are presented in lists, not grids.
Unicode BMP Fallback Font – displays the Unicode 6.1 value of any character in a document, including in the Private Use Area, rather than the glyph itself.