||This article has an unclear citation style. (May 2012)|
Unicode input is the insertion of a specific Unicode character on a computer by a user. Unicode characters can be inserted in three ways: from the screen by means of an applet from which one can select the character, by pasting from the clipboard or by certain key sequence on the keyboard. Unicode is similar to ASCII, but provides many more options and can store more signs.
A Unicode input system needs to provide 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.
- 1 Unicode numbers
- 2 Availability
- 3 Selection from a screen
- 4 Hexadecimal code input
- 5 Character mnemonics
- 6 Specialized tools
- 7 See also
- 8 External links
- 9 References
Unicode characters are distinguished by code points, which are conventionally represented by the letter U followed by four or five hexadecimal digits, for example U+00AE or U+1D310. 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, playing cards and many CJK characters) have 5-digit codes.
Unicode in HTML
HTML uses a different syntax for code points. Character codes may be specified after ampersand (&) and the number sign (#), and are followed by the semicolon (;). The number can be either in decimal or in hexadecimal. Preceding zeros may be omitted. If the input is in hexadecimal, the number is preceded by an "x". Some characters can also be used by "entity name".
Example: The HTML code of the copyright sign
©) can be:
© (decimal input)
© (hexadecimal input)
© (entity name)
For displaying a Unicode character, it must be present in the chosen font. Different fonts have different glyphs for the same Unicode, thus the appearance of the character will depend on the font which is defined in the web browser or application. Also, not every Unicode is available in every font. The availability of a specific character depends on its presence in the specified font; every font has its own number of characters, or even none at all. Most characters will not be available. If a desired character is not present in the available fonts, a suitable font should be installed on the system. The character can be displayed on the system now, but if it is a more or less exotic one, it will not be visible on many other systems. An empty box, a question mark or another replacement will be shown: �.
Older web browsers can only display text supported by the current font associated with the character encoding of the page. Some modern browsers, such as Mozilla Firefox, Opera, Safari and Internet Explorer (version ≥ 7), are able to display multilingual web pages by intelligently choosing a font to display each individual character on the page. They will correctly display any mix of Unicode blocks, as long as appropriate fonts are present in the operating system. After installation of a missing font the browser will find the correct Unicode character automatically after restart.
Selection from a screen
Many systems provide a way to select Unicode characters visually. ISO 14755 refers to this as a screen-selection entry method.
Microsoft Windows has provided a Unicode version of the Character Map program (find it by hitting ⊞ Win+R then type
charmap then hit ↵ Enter) since version NT 4.0 – 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.
Mac OS X provides a "character palette" with much the same functionality, along with searching by related characters, glyph tables in a font, etc. It can be enabled in the input menu in the menu bar under System Preferences → International → Input Menu (or System Preferences → Language and Text → Input Sources) or can be viewed under Edit → Special Characters... while Finder is in the foreground.
Hexadecimal code input
Clause 5.1 of ISO 14755 describes a Basic method whereby a beginning sequence is followed by the hex number representation of the code point and the ending sequence. On some systems, this is limited to the BMP (characters up to U+FFFF).
In Microsoft Windows
In Microsoft Windows, if the registry key
HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad has a string (REG_SZ) value of "1", holding down Alt[clarification needed] and pressing the + on the numeric keypad (only numeric keypad entries are allowed in Windows 7+), followed by the hex code (using the main letter keys and any of the number keys), then releasing Alt will work. You must log off/in on Windows 7 and Vista or reboot on earlier systems after setting this registry key for this input method to start working.
The RichEdit control on Microsoft Windows (as used in for example WordPad) supports the following input method: one first enters the character’s hexadecimal code (between two and six hexadecimal digits), then immediately presses Alt+x. For example, entering f1 and then pressing the combination will produce the character ñ. Unless it is six hexadecimal digits long, the code must not be preceded by any digit or letters a–f as they will be treated as part of the code to be converted. For example, entering af1 followed by Alt+x will produce ૱ (U+0AF1), but entering a0000f1 followed by Alt+x will produce añ. This also works in Microsoft Word 2002/2003 for Windows.
In Mac OS
In Mac OS X the "Special Characters…" (⌘ Command+⌥ Option+T) menu can be found in the Edit menu in many programs. This brings up the Characters palette allowing the user to choose any character from a variety of views. The user can then also search for the character or Unicode plane by name. In Mac OS 8.5 and later: one chooses the Unicode Hex Input keyboard layout. Holding down the ⌥ Option, one then types the four-digit hex Unicode code point and the equivalent character appears. One can then release the ⌥ Option key. Characters outside of the BMP exceed the four-digit limit of the Unicode hex input mechanism but can be entered using the search entry box in the Character Viewer (Edit → Special Characters…) or by using surrogate pairs. To use surrogate pairs, hold down the ⌥ Option key, the first surrogate, the + key (shift key is ignored), the second surrogate and then release the Option key.
In X11 (Linux and other Unix variants)
The possibility of hexadecimal code input on operating systems using the X Window System depends on the system and applications. Hex input is not implemented in the common X.Org Server. Individual input methods and GUI toolkits can provide hex input independent of the X server.
For example, GTK+ is an ISO 14755-conformant system. The beginning sequence is Ctrl+⇧ Shift+U and the ending sequence is ↵ Enter or Space. Programs based on GTK+, such as GNOME applications, support Unicode input.
There are two common methods for direct input of Unicode characters:
- Hold Ctrl+⇧ Shift and type u followed by the four hex digits. Then release Ctrl+⇧ Shift.
- Enter Ctrl+⇧ Shift+u, release, then type the four hex digits, and press ↵ Enter (or Space or even on some systems, press and release ⇧ Shift or Ctrl ).
In non-GTK applications, however, there usually is no escape sequence to input arbitrary input characters. For example, Qt, KDE rely on the standard X Input Method (XIM) framework, and do not implement their own solutions. In xterm, these input methods are not be supported, but using escape sequences is an alternative.
However, regardless of the toolkit used, the Compose key subsystem can be used to configure certain key stroke combinations to input a subset of unicode.
In platform independent applications
- In Opera (browser) versions, that use the Presto layout engine - i.e. up to and including version 12.xx -, enter the hexadecimal number of the desired symbol or character and then press Ctrl+⇧ Shift+x (alternative shortcut Meta+⇧ Shift+x on OS X).
- In the Vim editor, in insert mode, the user first types Ctrl+V u, then types in the hexadecimal number of the symbol or character desired, and it will be converted into the symbol. (On Microsoft Windows, Ctrl+Q may be required instead of Ctrl+V.)
The capability of Vim to create custom mnemonics, as described below, which could be employed on an ad-hoc basis, requires the decimal code point.
RFC 1345 defines a large number (1,893) of suggested mnemonics for code points in Unicode 1.0 (as well as characters in ISO 2DIS 10646 and many other character sets in use at the time of publication). Although the document does not restrict the length of a mnemonic (for example, "10000R" for U+2821), most (1,338) of the mnemonics are two characters long, and most (416) of the remaining are three-characters. While never complete, and targeting obsolescent set definitions, the mnemonics themselves can still be used.
- Vim allows mnemonics entry (confusingly called "digraphs" by Vim developers) in insert mode (the regular mode for typing text) with Ctrl+K followed by a two-keystroke RFC 1345 mnemonic; or, in addition, if the
digraphoption is set, by entering the first character followed by a backspace followed by the second character. Custom mnemonics can also be defined for arbitrary code points. (For example, "dig Gr 9881" associates "Gr" with U+2699 ⚙ gear.)
- GNU Emacs allows mnemonics entry by switching to rfc1345 input mode (by default Ctrl+x Ctrl+\.
- GNU Screen allows mnemonics entry with (by default) Ctrl+A Ctrl+V.
- Zsh allows mnemonics entry using the
There are several tools that allow quick input of Unicode characters in applications. The input method of the free tool ЮNICODE Keyboard Enhancer uses hotkeys: To type a Unicode character you press and hold the modifier key and then press the selected symbol key. Which physical key takes the function of the modifier key as well the appropriated symbol keys are to be defined by user.
Another free tool is UnicodeIt. It converts LaTeX expressions like \alpha into Unicode. On the Mac, this works in most programs (including Keynote and Mail) using a keyboard shortcut. This tool also has an online version at http://www.unicodeit.net which works on most platforms including smart phones.
There is also a free webtool called Shapecatcher that can by used to find Unicode characters by drawing them.
|Wikibooks has a book on the topic of: Unicode/List of useful symbols|
- Unicode Code Converter
- Interactive Unicode Converter
- ЮNICODE Keyboard Enhancer – type Unicode characters in (almost) any Unicode-compatible application
- How to enter Unicode characters in Microsoft Windows
- The Unicode Consortium
- Lafontaine, Sylvain. "Unicode vs ASCII difference and benefits". MSDN. Retrieved 28 February 2014.
- How to enter Unicode characters in Microsoft Windows Access date: september 13, 2012
- typing special and accented characters
- UTF-16/UCS-2#Encoding of characters outside the BMP
- Xorg Bug 26747 - X does not allow input of Unicode characters using Ctrl+Shift followed by the character code
- KDE Bug 103788 - input of arbitrary unicode characters as defined in ISO 14755
- Vim documentation: gui_w32