Unicode input

Short description: Input characters using their Unicode code points

The KCharSelect character mapping tool shown displaying a subset of the Unicode Mathematical Operators The Unicode logo

Unicode input is a method to encode specific characters that are not directly available on a physical keyboard. Characters can be entered either by selecting them from a display, by typing a certain sequence or a 'chord' of keys on a physical keyboard, or by drawing the symbol by hand on touch-sensitive screen. In contrast to ASCII's 96 element character set (which it contains), Unicode encodes hundreds of thousands of graphemes (characters) from almost all of the world's written languages as well as many other signs and symbols.[1] A comprehensive Unicode input system must provide for a large repertoire of characters, ideally all valid Unicode code points. This is different from a keyboard layout which defines keys and their combinations only for a limited number of characters appropriate for a certain locale. Nevertheless, the latter technique (particularly if an "extended" setting is used) is often adequate to satisfy the needs of most users, most of the time.

## Contents

* 1 Unicode numbers
* 2 Grapheme availability
* 3 Techniques
* 3.1 Extended keyboard mapping
* 3.2 Selection from a screen
* 3.3 Decimal input (Alt codes)
* 3.4 Hexadecimal input
* 3.4.1 In Microsoft Windows
* 3.4.2 In MacOS
* 3.4.3 In X11 and Wayland (Linux and other Unix variants including ChromeOS)
* 3.5 In platform-independent applications
* 3.6 HTML
* 4 See also
* 5 Notes
* 6 References

## Unicode numbers

Unicode characters are distinguished by code points, which are conventionally represented by "U+" followed by four, five or six hexadecimal digits, for example U+00AE or U+1D310, which are "®" and "𝌐" respectively. Characters in the Basic Multilingual Plane (BMP), containing modern scripts – including many Chinese and Japanese characters – and many symbols, have a 4-digit code. Historic scripts, but also many modern symbols and pictographs (such as emoticons, emojis, playing cards and many CJK characters) have 5-digit codes.

## Grapheme availability

An application can display a character only if it can access a computer font which contains a grapheme for that character.[2] Fonts usually have incomplete Unicode coverage; most only contain the graphemes needed to support a few writing systems. However, most modern browsers and other text-processing applications are able to display multilingual content because they perform font substitution, automatically switching to a fallback font when necessary to display characters which are not supported in the current font. Which fonts are used for fallback and the thoroughness of Unicode coverage varies by software and operating system; some software will search for a suitable glyph in all of the installed fonts, others only search within certain fonts.

If an application does not have access to a glyph for a required codepoint in the specified font,[lower-alpha 1] the character should be shown as the font's `.notdef` glyph ⟨􏿮⟩.[3] This often appears as an empty box, ☐ (nicknamed "tofu" based on the shape), a box with an X in it, ☒, a diamond with a question mark, �, or a box with a question mark in it, ⍰.

## Techniques

### Extended keyboard mapping

Most operating systems support an 'extended keyboard mapping' system setting, which is a facility to increase the repertoire of characters - typically a precomposed character, a typographic symbol or punctuation mark, or other specialist graphemes - beyond those enabled by the keyboard and keyboard mapping provided by default with the computer. The most well-known techniques include

* Alternate graphic ( or right- key) that gives a third and fourth meaning to every key;
* Compose key (sometimes called multi key), a key on a computer keyboard that indicates that the following (usually 2 or more) keystrokes trigger the insertion of an alternate character;[4]
* A dead key, a normal key that is repurposed to affect the behaviour of the next key pressed. It is typically used to attach a specific diacritic to a base letter;[5]

or indeed combinations of these. The precise methods depend on which type of type of physical keyboard and (especially) the mapping used with it.

### Selection from a screen

GNOME Character Map

Many systems provide a way to select Unicode characters visually. ISO/IEC 14755 refers to this as a screen-selection entry method.[6]

Microsoft Windows has provided a Unicode version of the Character Map program, appearing in the consumer edition since XP. This is limited to characters in the Basic Multilingual Plane (BMP). Characters are searchable by Unicode character name, and the table can be limited to a particular code block.[7] Starting with Windows 10 Microsoft Windows also contains so called "emoji keyboard". It can be started by holding down the Windows key and hitting the period or semicolon key. The emoji keyboard allows entering of emojis as well as symbols.[8]

More advanced third-party tools of the same type are also available (a notable freeware example is BabelMap, which supports all Unicode characters). On most Linux desktop environments, equivalent tools – such as gucharmap (GNOME) or kcharselect (KDE) – are available.[9]

Generally these tools let the user "copy" the selected characters into the clipboard, and then paste them into the document, rather than pretending to directly type them.

It is often practical to just find the desired character on the web or in another document, and copy and paste it from there.

### Decimal input (Alt codes)

This section needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Unicode input" – news · newspapers · books · scholar · JSTOR (October 2024) (Learn how and when to remove this template message)

|

Some programs running in Microsoft Windows, including recent versions of Word and Notepad, can produce characters from their Unicode code points expressed in decimal and entered on the numeric keypad with the key held down.[10] For example, the Euro sign € has 20AC as its hexadecimal code point,[11] which is 8364 in decimal, so will produce the symbol.

Decimal code points in the range 160 –255 must be entered with a leading zero (so that the Windows code page is chosen) and furthermore the Windows code page CP1252 must be used.[lower-alpha 2] For example, yields a ÷, corresponding to its code point, but the character produced by depends on the Template:Pslink, such as Code page 437, and may yield a ≈. Also through yield the characters assigned in rows 8 and 9 in the CP1252 layout, rather than the C1 control codes that are assigned to those numbers in Unicode.

In programs which were not designed to handle Alt codes over 255, the character retrieved usually corresponds to the remainder when the number is divided by 256.

The text editor Vim allows characters to be specified by two-character mnemonics referred to as digraphs.[12] The installed set can be augmented by custom mnemonics defined for arbitrary code points, specified in decimal. For example, as decimal 9881 is equal to hexadecimal 2699, `dig Gr 9881` associates "Gr" with U+2699 ⚙ GEAR.

See below for use of decimal code points in HTML.

### Hexadecimal input

Clause 5.1 of ISO/IEC 14755 describes a Basic method whereby a beginning sequence is followed by the hex number representation of the code point and the ending sequence. Most modern systems have some method to emulate this, sometimes limited to four digits (thus only the Basic Multilingual Plane).

#### In Microsoft Windows

Hexadecimal Unicode input can be enabled by adding a string type (REG_SZ) value called `EnableHexNumpad` to the registry key `HKEY_CURRENT_USER\Control Panel\Input Method` and assigning the value data `1` to it. Users will need to log off and back in after editing the registry for this input method to start working. (In versions earlier than Windows Vista, users needed to reboot for it to start working.) Unicode characters can then be entered by holding down , and typing on the numeric keypad, followed by the hexadecimal code, and then releasing .[2] This may not work for 5-digit hexadecimal codes like `U+1F937`. Some versions of Windows may require the digits 0-9 to be typed on the numeric keypad or require NumLock to be on. In some applications (Office, Notepad and LibreOffice programs) will replace the hexadecimal number to the left of the cursor with the matching Unicode character. Unless it is six hexadecimal digits long, the code must not be preceded by any digit or letters a–f as they may be treated as part of the code to be converted. For example, entering `af1` followed by (or if using a French version) will produce U+0AF1 ૱ , but entering `a0000f1` followed by will produce 'añ' (Template:Unichar2 followed by U+00F1 ñ ). [citation needed]

This facility enables Unicode characters to be entered in other applications: one can create a desired character in Notepad, for example, and then cut and paste it wherever desired.

#### In MacOS

Hex input of Unicode must be enabled. In Mac OS 8.5 and later, one can choose the Unicode Hex Input keyboard layout; in OS X (10.10) Yosemite, this can be added in Keyboard → Input Sources.

Holding down , one types the four-digit hexadecimal Unicode code point and the equivalent character appears; one can then release the key.[13] Characters outside of the BMP (the Basic Multilingual Plane) exceed the four-digit limit of the Unicode hex input mechanism but can be entered by using surrogate pairs: holding down the key while entering the first surrogate, the , the second surrogate, then releasing the Option key.

#### In X11 and Wayland (Linux and other Unix variants including ChromeOS)

In many applications one or both of the following methods work to directly input Unicode characters:

* Holding and typing followed by the hex digits, then releasing .
* Entering , releasing, then typing the hex digits and pressing (or or even, on some systems, pressing and releasing or ).[14]

This is supported by GTK and Qt applications, and possibly others. In ChromeOS, this is an operating system function.[14]

### In platform-independent applications

* In Emacs, invokes the `insert-char` command, which accepts input either via hex code point or unicode char name.
* In LibreOffice 5.1 onwards, the method described above for Windows works.
* In Opera versions that use the Presto layout engine—i.e. up to and including version 12.xx—, entering the hexadecimal number of the desired symbol or character and then pressing (alternative shortcut on macOS).
* In the Vim editor, in insert mode, the user first types (for codepoints up to 4 hex digits long; using for longer), then types in the hexadecimal number of the symbol or character desired, and it will be converted into the symbol. (On Microsoft Windows, may be required instead of .[15])
* In AutoCAD `\U+2C72` or three shortcuts `%%c`, `%%d`, `%%p`.

### HTML

Main article: Numeric character reference

In HTML and XML, character codes to be rendered as characters are prefixed by ampersand and number sign (&#), and are followed by a semicolon (;). The code point can be either in decimal or in hexadecimal; in the latter case it is preceded by an "x". Leading zeros may be omitted. A number of characters may be represented by a named entity.

Example: In HTML/XML, U+00A9 (C) [[|]] may be coded as:

* `&#169;` (decimal code point)
* `&#xa9;` (hexadecimal code point)
* `&copy;` (entity name)

This works in many pieces of software that accept HTML markup, such as Thunderbird and Wikipedia editing.

## See also

Various glyphs representing the letter ⟨a⟩ in various typefaces and as single- and double-storey; they are allographs of the same grapheme

* ASCII
* [[Digraphs and trigraphs (programming)|]]
* Glyph - Element of writing
* Typeface - Set of characters that share common design features

## Notes

1. ↑ or in fallback font(s), if any.
2. ↑ CP1252 is the default in North and South America including the Caribbean islands, Western Europe, Central and Southern Africa, Australia, New Zealand, and the (former) European colonies and possessions in Oceania

## References

1. ↑ Lafontaine, Sylvain (February 17, 2012). "Unicode vs ASCII difference and benefits". MSDN. http://social.msdn.microsoft.com/Forums/sqlserver/en-US/918f7c8b-cc16-4c03-b4f9-f9b0660e0587/unicode-vs-ascii-difference-and-benefits?forum=transactsql.
2. ↑ 2.0 2.1 Andrew Marcuse, "How to enter Unicode characters in Microsoft Windows". Access date: September 13, 2012
3. ↑ "Recommendations for OpenType Fonts". Microsoft. https://learn.microsoft.com/en-us/typography/opentype/spec/recom. "Glyph 0 must be assigned to a .notdef glyph. The .notdef glyph is very important for providing the user feedback that a glyph is not found in the font. This glyph should not be left without an outline as the user will only see what looks like a space if a glyph is missing and not be aware of the active font’s limitation."
4. ↑ "Linux Keyboard Text Symbols: Compose-Key Shortcuts". 2013-07-24. http://fsymbols.com/keyboard/linux/compose/.
5. ↑ "Dead Key | Definition of Dead Key by Merriam-Webster". Merriam-webster.com. http://www.merriam-webster.com/dictionary/dead key.
6. ↑ "ISO/IEC 14755:1997 Information technology -- Input methods to enter characters from the repertoire of ISO/IEC 10646 with a keyboard or other input device". ISO. https://www.iso.org/standard/25491.html.
7. ↑ "How to Use Special Characters in Windows Documents". Jul 31, 2019. https://support.microsoft.com/en-us/help/315684/how-to-use-special-characters-in-windows-documents.
8. ↑ "Windows 10 Tip: Get started with the emoji keyboard shortcut". Feb 5, 2018. https://blogs.windows.com/windowsexperience/2018/02/05/windows-10-tip-get-started-emoji-keyboard-shortcut/.
9. ↑ Peck, Akkana (2009-11-25). "Mastering Characters Sets in Linux (Weird Characters, part 2)". LinuxPlanet. http://www.linuxplanet.com/linuxplanet/tutorials/6912/1.
10. ↑ "Insert ASCII or Unicode character codes in Word - Microsoft Support". https://support.microsoft.com/en-us/office/insert-ascii-or-unicode-character-codes-in-word-e97306f7-00c1-490d-9920-c924ca443f87.
11. ↑ "Currency symbols". https://www.unicode.org/charts/nameslist/n_20A0.html.
12. ↑ "ii.com: Vim, Unicode, and Digraphs". https://www.ii.com/vim-unicode-digraphs/.
13. ↑ Typing special and accented characters
14. ↑ 14.0 14.1 Jack Busch (April 20, 2018). "Type Special Characters with a Chromebook (Accents, Symbols, Em Dashes)". https://www.groovypost.com/howto/type-special-characters-chromebook-accents-symbols-em-dashes.
15. ↑ Vim documentation: gui_w32

* v
* t
* e

Unicode

Unicode|

* Unicode Consortium
* ISO/IEC 10646 (Universal Character Set)
* Versions

Code points|

* Blocks
* Universal Character Set
* Character charts
* Character property
* Planes
* Private Use Areas

Characters|

| Special purpose|

* BOM
* Combining Grapheme Joiner
* Left-to-right mark / Right-to-left mark
* Soft hyphen
* Word joiner
* Zero-width joiner
* Zero-width non-joiner
* Zero-width space

|

Lists|

* Characters
* CJK Unified Ideographs
* Combining character
* Duplicate characters
* Numerals
* Scripts
* Spaces
* Symbols
* Halfwidth and fullwidth
* Alias names and abbreviations

Processing|

| Algorithms|

* Bi-directional text
* Collation
* ISO 14651
* Equivalence
* Variation sequences
* International Ideographs Core

|

Comparison|

* BOCU-1
* CESU-8
* Punycode
* SCSU
* UTF-1
* UTF-7
* UTF-8
* UTF-9/UTF-18
* UTF-16/UCS-2
* UTF-32/UCS-4
* UTF-EBCDIC

On pairs of
code points|

* Combining character
* Compatibility characters
* Duplicate characters
* Equivalence
* Homoglyph
* Precomposed character
* list
* Z-variant
* Variation sequences
* Regional Indicator Symbol
* Fitzpatrick modifiers

Usage|

* Domain names (IDN)
* Email
* Fonts
* HTML
* entity references
* numeric references
* Input
* International Ideographs Core

Related standards|

* Common Locale Data Repository (CLDR)
* GB 18030
* ISO/IEC 8859
* ISO 15924

Related topics|

* Anomalies
* ConScript Unicode Registry
* Ideographic Research Group
* International Components for Unicode
* People involved with Unicode
* Han unification

Scripts and symbols in Unicode

Common and
inherited scripts|

* Combining marks
* Diacritics
* Punctuation
* Space
* Numbers

Modern scripts|

* Adlam
* Arabic
* diacritics
* Armenian
* Balinese
* Bamum
* Batak
* Bengali
* Bopomofo
* Braille
* Buhid
* Burmese
* Canadian Aboriginal
* Chakma
* Cham
* Cherokee
* CJK Unified Ideographs (Han)
* Cyrillic
* Deseret
* Devanagari
* Ge'ez
* Georgian
* Greek
* Gujarati
* Gunjala Gondi
* Gurmukhi
* Hangul
* Hanifi Rohingya
* Hanja
* Hanunuo
* Hebrew
* diacritics
* Hiragana
* Javanese
* Kanji
* Kannada
* Katakana
* Kayah Li
* Khmer
* Lao
* Latin
* Lepcha
* Limbu
* Lisu (Fraser)
* Lontara
* Malayalam
* Masaram Gondi
* Mende Kikakui
* Medefaidrin
* Miao (Pollard)
* Mongolian
* Mru
* N'Ko
* New Tai Lue
* Nüshu
* Nyiakeng Puachue Hmong
* Odia
* Ol Chiki
* Osage
* Osmanya
* Pahawh Hmong
* Pau Cin Hau
* Pracalit (Newa)
* Ranjana
* Rejang
* Samaritan
* Saurashtra
* Shavian
* Sinhala
* Sorang Sompeng
* Sundanese
* Sylheti Nagari
* Syriac
* Tagbanwa
* Tai Le
* Tai Tham
* Tai Viet
* Tamil
* Telugu
* Thaana
* Thai
* Tibetan
* Tifinagh
* Tirhuta
* Vai
* Wancho
* Warang Citi
* Yi

Ancient and
historic scripts|

* Ahom
* Anatolian hieroglyphs
* Ancient North Arabian
* Avestan
* Bassa Vah
* Bhaiksuki
* Brāhmī
* Carian
* Caucasian Albanian
* Coptic
* Cuneiform
* Cypriot
* Dogra
* Egyptian hieroglyphs
* Elbasan
* Elymaic
* Glagolitic
* Gothic
* Grantha
* Hatran
* Imperial Aramaic
* Inscriptional Pahlavi
* Inscriptional Parthian
* Kaithi
* Kharosthi
* Khojki
* Khudawadi
* Linear A
* Linear B
* Lycian
* Lydian
* Mahajani
* Makasar
* Mandaic
* Manichaean
* Marchen
* Meetei Mayek
* Meroitic
* Modi
* Multani
* Nabataean
* Nandinagari
* Ogham
* Old Hungarian
* Old Italic
* Old Permic
* Old Persian cuneiform
* Old Sogdian
* Old Turkic
* Palmyrene
* 'Phags-pa
* Phoenician
* Psalter Pahlavi
* Runic
* Sharada
* Siddham
* Sogdian
* South Arabian
* Soyombo
* Tagalog (Baybayin)
* Takri
* Tangut
* Ugaritic
* Zanabazar Square

Notational scripts|

* Duployan
* SignWriting

Symbols|

* Cultural, political, and religious symbols
* Currency
* Mathematical operators and symbols
* Phonetic symbols (including IPA)
* Emoji

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Unicode input. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Unicode_input&oldid=4227418"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template