Difference between revisions of "Unicode"

From RogueBasin
Jump to navigation Jump to search
m (catagorize)
Line 1: Line 1:
In [[computing]], '''Unicode''' provides an [[international standard]] which has the goal of providing the means to [[encode]] the [[text]] of every [[document]] people want to store on [[computer]]s. This includes all [[Writing system|script]]s in active use today, many scripts known only by [[scholar]]s, and [[symbol]]s which do not strictly represent scripts, like [[mathematics | mathematical]], [[linguistics | linguistic]] and [[APL programming language|APL]] symbols.
== What is Unicode ==


Establishing Unicode involves an ambitious [[project]] to replace existing [[character encoding|character set]]s, many of them limited in size and problematic in [[multilingual]] environments. Despite technical problems and limitations, Unicode has become the most complete character set and one of the largest, and seems set to serve as the dominant encoding scheme in the [[internationalization]] of [[Computer software|software]] and in multilingual environments. Many recent technologies, such as [[XML]], the [[Java programming language]] as well as several [[operating system]]s, have adopted Unicode as an underlying scheme to represent text.
First there was [[ASCII]].  While no one wants to return to the pre-ascii days where no two computers would agree on what bit patterns constituted the letter 'A', all was not right in the world.  Languages with non-Latin orthographies found that their fancy a-with-a-squiggle-on-top could not be represented. At first, this was solved by taking the upper half of 8-bit character set to define accented characters. These high-order characters often also had various graphical symbols attached to them.


== Origin and development ==
The trouble with standards is that there are so many to choose from.  While the 100th character is always the same, the 200th character isn't the same from computer to computer.  It depends on which [[Code page]] is loaded.  Assumptions about [[Code page]]s being the same leads to strange gibberish being displayed rather than the correct accented character.  Also, not all languages can fit even with the 128 extra characters of extended [[ASCII]].


Unicode has the explicit aim of transcending the limitations of traditional [[character encoding]]s, such as those defined by the [[ISO 8859]] standard which get wide use 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 character]]s and the local language), but not multilingual computer processing (computer processing of arbitrary languages mixed with each other).
Unicode is an attempt to resolve this once and for all by using a larger character set (16bits) along with built in extensibility to allow it to map all known human glyphs into one consistent character set.


Unicode, in intent, encodes the underlying [[character (computing)|character]]s — [[grapheme]]s and grapheme-like units — rather than the variant [[glyph]]s (renderings) for such characters.  In the case of [[Chinese character]]s, this sometimes leads to controversies over distinguishing the underlying character from its variant glyphs (see [[Han unification]]).
This process proceeded quite well until someone asked who the heck gets to actually draw the hundreds of thousands of characters that would make up a Unicode fontAs a result, while it is guaranteed that the A with a squiggle on top will be defined as an A with squiggle on top on every computer under Unicode, it is not at all guaranteed that the user will be able to render it as anything other than a blank space.


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.
== Unicode in Roguelikes ==


The first 256 code points were made identical to the content of [[ISO 8859-1]], to make it trivial to convert existing western text. A lot of 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 form]]s" section of code points encompasses a full Latin alphabet that is separate from the main Latin alphabet section. In CJK fonts, these characters are rendered at the same width as [[CJK]] [[ideograph]]s rather than half the width. For other examples, see [[Duplicate characters in Unicode]].
Many roguelikes, including [[NetHack]], have included options to take advantage of high order [ASCII]] to get extra symbols, allowing them to draw walls with lines rather than # marks.


Also, whilst Unicode allows for [[combining character]]s, it also contains [[precomposed character|precomposed]] versions of most letter/diacritic combinations in normal use. These make conversion to and from legacy encodings simpler and mean applications can 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).
Unicode has the potential of letting roguelikes access these special glyphs in a platform independent manner. Unfortunately, Unicode, by its "embrace every known glyph" mentality, can't guarantee that the font that you are using actually has the glyph defined.


The Unicode standard also includes a number of related items, such as character properties, text normalisation forms, and bidirectional display order (for the correct display of text containing both right-to-left scripts, such as [[Arabic language|Arabic]] or [[Hebrew language|Hebrew]], and left-to-right scripts).
Roguelikes that use Unicode are:
 
* (None yet known)
==Scripts covered==
 
Unicode covers almost all scripts ([[writing system]]s) in current use today.
That includes:
<table border=0 width="90%">
<tr valign=top>
<td>
* [[Arabic_alphabet|Arabic]]
* [[Armenian_alphabet|Armenian]]
* [[Bengali_script|Bengali]]
* [[Braille]] embossing patterns
* [[Canadian Aboriginal Syllabics]]
* [[Cherokee_language#Cherokee_Syllabary|Cherokee]]
* [[Coptic_Alphabet|Coptic]]
* [[Cyrillic_alphabet|Cyrillic]]
* [[Devan%C4%81gar%C4%AB|Devanagari]]
* [[Ge%27ez_language#Ge.27ez_writing_system|Ethiopic]]
* [[Georgian alphabet|Georgian]]
</td>
<td>
* [[Greek alphabet|Greek]]
* [[Gujarati_script|Gujarati]]
* [[Gurmukhi#Alphabet|Gurmukhi]]
* [[Hangul]] ([[Korean language|Korean]])
* [[Chinese_character|Han]] ([[Kanji]], [[Hanja]], [[Chinese_character|Hanzi]])
* [[Japanese_writing_system|Japanese]] ([[Kanji]], [[Hiragana]] and [[Katakana]])
* [[Hebrew alphabet|Hebrew]]
* [[Hiragana]]
* [[Katakana]]
* [[Khmer script|Khmer]] (Cambodian)
* [[Kannada script|Kannada]]
* [[Lao_alphabet|Lao]]
</td>
<td>
* [[Latin_alphabet|Latin]]
* [[Malayalam_script|Malayalam]]
* [[Mongolian_alphabet|Mongolian]]
* [[Burmese alphabet|Myanmar]] (Burmese)
* [[Oriya alphabet|Oriya]]
* [[Syriac_alphabet|Syriac]]
* [[Tamil_script|Tamil]]
* [[Thai_alphabet|Thai]]
* [[Tibetan_script|Tibetan]]
* [[Yi_script|Yi]]
* [[Zhuyin]] (Bopomofo)
and more.
</td>
</tr>
</table>
 
Unicode has added further scripts and will cover even more, including historic scripts less commonly used as well as extinct ones for academic purposes:
 
<table border=0 width="90%">
<tr>
<td>
* [[Runic_alphabet|Runic]]
* [[hieroglyphs|Egyptian hieroglyphs]]
* [[Maya_hieroglyphics|Mayan]]
* [[Cuneiform_script|Cuneiform]]
* [[Ugaritic alphabet|Ugaritic]]
* [[Old Italic alphabet|Old Italic]] (Etruscan)
&hellip;
</td>
</tr>
</table>
 
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 [http://www.unicode.org/roadmaps/ Unicode Roadmap] lists scripts not yet in Unicode with tentative assignments to code blocks. 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. Similarly, many medieval letter variants and ligatures not in Unicode are encoded in the [[Medieval Unicode Font Initiative]].
 
===Trivia===
 
In [[1997]] [[Michael Everson]] made a proposal to encode the characters (tlhIngan piQad) of the fictional [[Klingon language]] (tlhIngan Hol) in Plane 1 of [[ISO 10646|ISO/IEC 10646-2]]. The Unicode Consortium rejected this proposal in [[2001]] as "inappropriate for encoding" &mdash; not because of any technical inadequacy, but because users of Klingon normally read, write and exchange data in [[Latin]] transliteration. Now that some enthusiasts are blogging in tlhIngan piQad using newly available fonts and keyboard layouts, the possibility of reapplying to ISO has been raised.
 
Proposals suggested the inclusion of the [[Elves (Middle-earth)|elvish]] scripts [[Tengwar]] and [[Cirth]] from [[J. R. R. Tolkien]]'s fictional [[Middle-earth]] setting in Plane 1 in [[1993]].  The Consortium withdrew the draft to incorporate changes suggested by [[Tolkienist]]s, and as of [[2005]] it remains under consideration.
 
Both Klingon and the Tolkien scripts have assignments in the ConScript Unicode Registry.
 
== Mapping and encodings ==
 
=== Standard ===
 
The Unicode Consortium, based in [[California]], develops the Unicode standard. Any company or individual willing to pay the membership dues may join this organization. Members include virtually all of the main computer software and hardware companies with any interest in text-processing standards, such as [[Apple Computer]], [[Microsoft]], [[International Business Machines|IBM]], [[Xerox]], [[Hewlett-Packard|HP]], [[Adobe Systems]] and many others.
 
The Consortium first published ''The Unicode Standard'' (ISBN 0321185781) in [[1991]], and continues to develop standards based on that original work. Unicode developed in conjunction with the [[ISO|International Organization for Standardization]], and it shares its character repertoire with [[ISO/IEC 10646]]. 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, [[Unicode collation algorithm|collation]], and rendering. The Unicode Standard enumerates a multitude of character properties, including those needed for [[BiDi]] support. The two standards do use slightly different terminology.
 
<!-- Template:Uplusfirst links to this paragraph -->
<div id="Upluslink">
When writing about a Unicode character, it is normal to write "U+" followed by a [[hexadecimal]] number indicating the character's code point. For code points in the [[Basic Multilingual Plane|BMP]] four digits are used; for code points outside the BMP five or six digits are used as required. Older versions of the standard used similar notations but with slightly different rules, for example, in Unicode 3.0 U- followed by eight digits whilst U+ with four digits was used for UTF-16 code units.
</div>
 
==== Unicode revision history ====
 
* [[1991]] Unicode 1.0
* [[1993]] Unicode 1.1
* [[1996]] Unicode 2.0
* [[1998]] Unicode 2.1
* [[1999]] Unicode 3.0
* [[2001]] Unicode 3.1
* [[2002]] Unicode 3.2
* [[2003]] Unicode 4.0
* [[2005]] Unicode 4.1
 
=== Storage, transfer and processing ===
 
So far, Unicode has appeared simply as a means to assign a unique number to each character used by [[human]]s in written language. The storage of these numbers in text processing comprises another topic; problems result from the fact that much [[software]] written in the [[Western world]] deals with 8-bit character encodings only, with Unicode support added only slowly in recent years. Similarly, in representing the languages of [[Asia]], the double-byte character encodings cannot even in principle encode more than 65,536 characters, and in practice the architectures chosen impose much lower limits. Such limits do not suffice for the needs of scholars of the [[Chinese language]] alone.
 
The internal logic of much 8-bit legacy software typically permits only 8 bits for each character, making it impossible to use more than 256 code points without special processing. Sixteen-bit software can support only some tens of thousands of characters. Unicode, on the other hand, has already defined more than 90,000 encoded characters. Systems designers have therefore suggested several mechanisms for implementing Unicode; which one implementers choose depends on available storage space, [[source code]] compatibility, and interoperability with other systems.
 
Unicode defines two mapping methods:
* the '''UTF''' ('''Unicode Transformation Format''') encodings
* the '''UCS''' ('''[[Universal Character Set]]''') encodings
The encodings include:
* [[UTF-32]]
* [[UCS-4]]
* [[UTF-16]]
* [[UCS-2]]
* [[UTF-8]]
* [[UTF-EBCDIC]]
* [[UTF-7]]
(The numbers indicate the number of bits in one unit (for UTF encodings) or bytes per unit (for UCS) encodings.)
 
In UTF-32 or UCS-4, one unit suffices for any character; in the other cases, each character may use a variable number of units. UTF-8 provides the ''de facto'' standard encoding for interchange of Unicode text with UTF-16. UTF-32 occurs mainly in internal processing.
 
The UCS-2 and UTF-16 encodings specify the Unicode [[Byte Order Mark|byte order mark]] (BOM) for use at the beginnings of text files. 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 <code>U+FEFF</code>,  has the important property of unambiguity, regardless of the Unicode encoding used.  The units <code>FE</code> and <code>FF</code> never appear in [[UTF-8]]; <code>U+FFFE</code> (the result of byte-swapping <code>U+FEFF</code>) does not equate to a legal character, and <code>U+FEFF</code> conveys the Zero-Width No-Break Space (a character with no appearance and no effect other than preventing the formation of [[ligature (typography)|ligature]]s). The same character converted to UTF-8 becomes the byte sequence <code>EF BB BF</code>.
 
See also: [[Mapping of Unicode characters]]
 
=== Ready-made vs. 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 mark]]s. They get inserted after the main character (one can stack several combining diacritics over the same character). However, for reasons of compatibility, Unicode also includes a large quantity of [[precomposed character | pre-composed character]]s. So in many cases, users have many ways of encoding the same character. To deal with this, Unicode provides the mechanism of [[canonical equivalence]].
 
A similar situation exists with [[Hangul]]. Unicode provides the mechanism for composing Hangul syllables with [[Hangul Jamo]]. However, it also provides the precomposed Hangul syllables (11,172 of them).
 
The [[CJK]] ideographs currently have codes only for their precomposed form. Still, most of those ideographs  evidently comprise simpler elements, so in principle Unicode could decompose them just as happens with [[Hangul]]. This would greatly reduce the number of required codepoints, while allowing the display of virtually every conceivable ideograph (and so doing away with all problems of the [[Han unification]]). A similar idea covers some [[input method]]s, such as [[Cangjie method|Cangjie]] and [[Wubi method|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.
 
Combining marks, like the complex script-shaping required to properly render [[Arabic language|Arabic]] text and many other scripts, usually depend on complex font technologies, like [[OpenType]] (by Adobe and [[Microsoft]]), Graphite (by [[SIL International]]), and [[Apple Advanced Typography|AAT]] (by [[Apple Computer|Apple]]), by which a font designer includes instructions in a font telling software how to properly output different character sequences.  [[Fixed-width]] fonts sometimes employ another method: placing the combining mark's glyph before its own left [[sidebearing]]; this method, however, only works for some diacritics and stacking will not occur properly.
 
[[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. Theoretically, {{unicode|&#7703;}} (precomposed e with macron and acute above) and {{unicode|e&#772;&#769;}} (e followed by the combining macron above and combining acute above) have an identical appearance, both giving an [[e]] with [[macron]] and [[acute accent]], but in practice, their appearances can vary greatly across software applications.
 
Also underdots, as needed in Indic [[Romanization]], will often get placed incorrectly or worse. Sample:
:{{unicode|m&#803; - n&#803; - l&#803;}}
Of course, such problems in fact show not a weakness in Unicode itself, but only uncover weaknesses in rendering technology and fonts.
 
=== Issues ===
 
Some people, mostly in Japan, oppose Unicode in general, claiming technical limitations and political problems in process. People working on the Unicode standard regard such claims simply as misunderstandings of the Unicode standard and of the process by which it has evolved. The most common mistake, according to this view, involves confusion between abstract [[characters]] and their highly-variable visual forms ([[glyphs]]). On the other hand, whereas Chinese can readily read most types of glyphs used by Japanese or Koreans, Japanese often can recognize only a particular variant.
 
Some have decried Unicode as a plot against Asian cultures perpetrated by Westerners with no understanding of the characters as used in Chinese, Korean, and Japanese, in spite of the presence of a majority of experts from all three countries in the [[Ideographic Rapporteur Group]] (IRG). The IRG advises the consortium and ISO on additions to the repertoire and on [[Han unification]], the identification of forms in the three languages which will one can treat as stylistic variations of the same historical character. Han unification has become one of the most controversial aspects of Unicode.
 
Unicode is criticized for failing to allow for older and alternate forms of [[kanji]], which, it is said, complicates the processing of ancient Japanese and uncommon Japanese names, although it follows the recommendations of Japanese scholars of the language and of the Japanese government. There have been several attempts to create an alternative to Unicode. [http://www-106.ibm.com/developerworks/unicode/library/u-secret.html] Among them are [[TRON (encoding)|TRON]] (although it is not widely adopted in Japan, some, particularly those who need to handle historical Japanese text, favor this), and [[UTF-2000]]. It is true that many older forms were not included in early versions of the Unicode standard, but Unicode 4.0 contains more than 90,000 Han characters, far more than any dictionary or any other standard, and work continues on adding characters from the early literature of China, Korea, and Japan.
 
[[Thai language]] support has been criticized for its illogical ordering of Thai characters. This complication is due to Unicode inheriting the [[TIS-620|Thai Industrial Standard 620]], which worked in the same way. This ordering problem complicates the Unicode collation process. [http://www-106.ibm.com/developerworks/unicode/library/u-secret.html]
 
Opponents of Unicode sometimes claim even now that it cannot handle more than 65,535 characters, a limitation that was removed in Unicode 2.0.
 
== Unicode in use ==
 
=== Operating systems ===
 
Despite technical problems and limitations and criticism on process, Unicode has emerged as the dominant encoding scheme.  [[Windows NT]] and its descendants [[Windows 2000]] and [[Windows XP]] make extensive use of [[UTF-16]] as an internal representation of text. [[Unix-like]] operating systems such as [[GNU/Linux]], [[Plan 9 (operating system)|Plan 9]], [[BSD]] and [[Mac OS X]] have adopted [[UTF-8]], as the basis of representation of [[multilingual text]].
 
=== E-mail ===
{{seemain|Unicode and 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. Most East-Asian text is still encoded in a local encoding such as [[Shift-JIS]], and many commonly used e-mail programs still cannot handle Unicode data correctly, if they have any support at all. This situation is not expected to change in the foreseeable future.
 
=== Web ===
 
Recent web browsers display web pages using Unicode if an appropriate [[typeface|font]] is installed (see [[Unicode and HTML]]).
 
Although syntax rules may affect the order in which characters are allowed to appear, both HTML 4.0 and XML 1.0 documents, by definition, comprise characters from most of the Unicode code points, with the exception of:
* a handful of disallowed control characters
* the permanently-unassigned code points D800-DFFF
* any code point ending in FFFE or FFFF
* any code point above 10FFFF.
These characters manifest either directly as [[byte]]s 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, as long as the document's encoding supports the digits and symbols required to write the references (all encodings approved for use on the Internet do). For example, the references <code>&amp;#916;</code>, <code>&amp;#1049;</code>, <code>&amp;#1511;</code>, <code>&amp;#1605;</code>, <code>&amp;#3671;</code>, <code>&amp;#12354;</code>, <code>&amp;#21494;</code>, <code>&amp;#33865;</code>, and <code>&amp;#45307;</code> (or the same numeric values expressed in hexadecimal, with <code>&amp;#x</code> as the prefix) display on browsers as &#916;, &#1049;, &#1511;,&#8206; &#1605;, &#3671;, &#12354;, &#21494;, &#33865; and &#45307;— if the proper fonts exist, these symbols look like the [[Greek alphabet|Greek]] capital letter "Delta", [[Cyrillic alphabet|Cyrillic]] capital letter "Short I", [[Hebrew alphabet|Hebrew]] letter "Qof", [[Arabic alphabet|Arabic]] letter "Meem", [[Thai language|Thai]] [[numeral]] [[7]], [[Japanese language|Japanese]] [[Hiragana]] "A", [[simplified Chinese]] "[[Leaf]]", [[traditional Chinese]] "Leaf", and [[Korean language|Korean]] [[Hangul]] syllable "Nyaelh", respectively.
 
=== Fonts ===
 
Free and retail fonts based on Unicode occur commonly, since first [[TrueType]] and now [[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. 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.
 
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 Latin, Greek and Cyrillic-based languages. Other standardized subsets of Unicode include [http://www.kostis.net/charsets/iso10646.mes-1.htm MES-1] (335 characters) and [http://www.cl.cam.ac.uk/~mgk25/ucs/mes-2-rationale.html MES-2] (1062 characters) (CWA 13873:2000, Multilingual European Subsets in ISO/IEC 10646-1).
 
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, &#xFFFD;), 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 International|SIL]] [[Unicode fallback font]] will display a box showing the hexadecimal scalar value of the character.
 
=== Multilingual Text Rendering Engines ===
*[[Uniscribe]] - [[Microsoft Windows|Windows]]
*[[Apple Type Services for Unicode Imaging]] - new engine for [[Apple Macintosh|Macintosh]]
*[[WorldScript]] - old engine for [[Apple Macintosh|Macintosh]]
*[[Pango]] - [[Open Source]]
*[[International Components for Unicode|ICU Layout Engine]] - Open Source
*[[Graphite (SIL)|Graphite]]  - (Open Source renderer from [[SIL International|SIL]])
*[[Qt (toolkit)|Scribe]] - Open Source renderer from [[Trolltech]]
 
===Input methods===
 
WordPad / Word 2002/2003 allows for entering Unicode characters by two methods:
# typing the hexadecimal code point, for example 014B for ''?'', and then pressing <code>Alt + x</code> to substitute the string to the left by its Unicode character.  Usefully, the reverse also applies: if a user positions a cursor to the right of a non-ASCII character and presses <code>Alt + x</code>, then the Microsoft software will substitute the character with the hexadecimal Unicode code point.
# pressing <code>Alt + #</code>, where # represents the decimal code point, for example <code>Alt + 0331</code> will produce the Unicode character ''?''.
 
Macintosh users have a similar feature with an input method called 'Unicode Hex Input', in [[Mac OS X]] and in [[Mac OS]] 8.5 and later: hold down the Option key, and type the four-hex-digit Unicode code point. Inputting code points above U+FFFF is done by entering [[UTF-16|surrogate pairs]]; the software will convert each pair into a single character automatically.  Mac OS X (version 10.2 and newer) also has a 'Character Palette', which allows users to visually select any Unicode character from a table organized numerically, by Unicode block, or by a selected font's available characters. The 'Unicode Hex Input' method must be activated in the International System Preferences in [[Mac OS X]] or the 'Keyboard' Control Panel in [[Mac OS]] 8.5 and later. Once activated, 'Unicode Hex Input' must also be selected in the Keyboard menu (designated by the flag icon) before a Unicode code point can be entered.
 
[[GNOME|Gnome2]] follows [[ISO 14755]]. Hold down Ctrl and Shift and enter the hexadecimal Unicode value.
 
The [[Opera (web browser)|Opera web browser]] in version 7.5 and over allows users to enter any Unicode character directly into a text field by typing its hexadecimal code, selecting it, and pressing <code>Alt + x</code>.
 
In the [[Vim (text editor)|Vim]] text editor, Unicode characters can be entered by pressing CTRL-V and then entering a key combination.  For more information, type "<code>:help i_CTRL-V_digit</code>" in Vim.  (Note that the entered text will only be Unicode if the current encoding is set to Unicode or a related format like UTF-8.)
 
==See also==
*[[Comparison of Unicode encodings]]
*[[Free software Unicode fonts]]


== External links ==
== External links ==


* [http://www.unicode.org The Unicode Consortium]
* [http://en.wikipedia.org/wiki/Unicode]
** Unicode versions: [http://www.unicode.org/unicode/reports/tr27/ 3.1], [http://www.unicode.org/unicode/reports/tr28/ 3.2], [http://www.unicode.org/versions/Unicode4.0.0 4.0], [http://www.unicode.org/versions/Unicode4.0.1/ 4.0.1], [http://www.unicode.org/versions/Unicode4.1.0/ 4.1]
** [http://www.unicode.org/alloc/Pipeline.html new characters], [http://www.unicode.org/pending/pending.html scripts] and [http://www.unicode.org/alloc/investigation.html characters and scripts under investigation]
** [http://www.unicode.org/charts/ Code Charts] ([[portable document format|PDF]])
* [http://unicode.coeurlumiere.com/ Table of Unicode characters from 1 to 65535]
* [http://www.macchiato.com/unicode/charts.html UTF-8, UTF-16, UTF-32 Code Charts] and a [http://www-atm.physics.ox.ac.uk/user/iwi/charmap.html character map] ([[JavaScript]])
* [http://www.eki.ee/letter/ The Letter Database] Uses forms to present groups in list or grid format by [[hexadecimal]].
* [http://www.decodeunicode.org/ decodeunicode] Unicode-Wiki with 50.000 gifs in three sizes. English/German.
*[http://www.cl.cam.ac.uk/~mgk25/ucs/examples/ Example text files using Unicode]
*[http://www.lazytools.com/unicode-ascii/  Unicode special character map] resembles the Windows version. Click a symbol to obtain either the named or numeric code for HTML.
* [http://www.evertype.com/standards/csur/ ConScript Unicode Registry] a project to standardize part of the Private Use Area for use with [[artificial script]]s and artificial languages.  An explanation of how to propose character names in Unicode is available here.
* [http://www-106.ibm.com/developerworks/unicode/library/u-secret.html The secret life of Unicode] "A peek at Unicode's soft underbelly" Describes problems requiring resolution.  Includes links to Unicode resources.
*Tim Bray's [http://www.tbray.org/ongoing/When/200x/2003/04/26/UTF Characters vs Bytes] explains how the different encodings work.
* [http://www.alanwood.net/unicode/ 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.
*[http://www.hastingsresearch.com/net/04-unicode-limitations.shtml A strong denunciation of Unicode], and a [http://slashdot.org/features/01/06/06/0132203.shtml response to it] (''n.b.'': This article is dated 2001, and much has changed regarding Unicode since that time)
*[[Software engineering]]:
** [http://icu.sourceforge.net/ International Components for Unicode (ICU)] An open source set of libraries that provide robust and full-featured Unicode services for your applications on a wide variety of platforms.
** [http://www.joelonsoftware.com/articles/Unicode.html The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)] by [[Joel Spolsky]] of JoelonSoftware.com (this is now outdated, but still a reasonable starting point).
** [http://freedesktop.org/wiki/Software_2futf_2d8 Freedesktop.Org's Project UTF-8]'s purpose is to document and promote proper Unicode support in free and Open Source software.
** [http://java.sun.com/developer/technicalArticles/Intl/Supplementary/ Supplementary Characters in the Java Platform] from [[Sun Microsystems]]
* Seeing [http://www.ianalbert.com/misc/unichart.php the entirety of Unicode printed out] as a single large poster gives a good feel for the size of the code.
*[http://www.unicodeart.com/ &#1160; Unicode art - an extended ASCII art form &#1160;]


[[category:roguelike development]]
[[category:roguelike development]]

Revision as of 20:09, 30 September 2005

What is Unicode

First there was ASCII. While no one wants to return to the pre-ascii days where no two computers would agree on what bit patterns constituted the letter 'A', all was not right in the world. Languages with non-Latin orthographies found that their fancy a-with-a-squiggle-on-top could not be represented. At first, this was solved by taking the upper half of 8-bit character set to define accented characters. These high-order characters often also had various graphical symbols attached to them.

The trouble with standards is that there are so many to choose from. While the 100th character is always the same, the 200th character isn't the same from computer to computer. It depends on which Code page is loaded. Assumptions about Code pages being the same leads to strange gibberish being displayed rather than the correct accented character. Also, not all languages can fit even with the 128 extra characters of extended ASCII.

Unicode is an attempt to resolve this once and for all by using a larger character set (16bits) along with built in extensibility to allow it to map all known human glyphs into one consistent character set.

This process proceeded quite well until someone asked who the heck gets to actually draw the hundreds of thousands of characters that would make up a Unicode font. As a result, while it is guaranteed that the A with a squiggle on top will be defined as an A with squiggle on top on every computer under Unicode, it is not at all guaranteed that the user will be able to render it as anything other than a blank space.

Unicode in Roguelikes

Many roguelikes, including NetHack, have included options to take advantage of high order [ASCII]] to get extra symbols, allowing them to draw walls with lines rather than # marks.

Unicode has the potential of letting roguelikes access these special glyphs in a platform independent manner. Unfortunately, Unicode, by its "embrace every known glyph" mentality, can't guarantee that the font that you are using actually has the glyph defined.

Roguelikes that use Unicode are:

  • (None yet known)

External links