Unicode input
Unicode input is the insertion of a specific Unicode character on a computer. Unicode characters can be inserted in two ways: from the screen by means of an applet from which one can select the character, or by input of the Unicode character from the keyboard. Many systems provide support for Unicode input in some form.
Contents |
Unicode numbers
Each Unicode character is mapped to a code point, which is represented by a Unicode number. In general, a Unicode number exists of 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.
Decimal input
In some applications on Microsoft Windows, particularly those using the RichEdit control, decimal Unicode code points (for example, 256 for U+0100) are supported with Alt codes.
Unicode in HTML
In HTML, the number sign (#) is used instead of "U". 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 U+00A9
(or ©
) can be:
©
(decimal input)
©
(hexadecimal input)
©
(entity name)
Availability
For displaying a Unicode character, it must be present in the chosen 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 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.
A better tool that is free , is Babelmap. On the Babelstone home page, Unicode links to Babelmap, pad and a few international fonts for glyphs found in no other fonts.
A similar look & feel is provided for other platforms via the online version of Babelmap.
A few notes on the executable: it is very simple -- no installer -- you need to copy it into a directory, and create a link to it on your desktop or a menu. The executable also shows what fonts (on your system) cover what characters, has a 'font analysis' utililty that shows font coverage; and can analyze all of your fonts to determine how to maximize unicode coverage with your font. Even though it generates a table of this in XML, Windows 7 has no facility for converting this information into it's it's XML forms. The utility shows character history, allows searching by name, and can generate output in UTF-8, NCR(hex, dec), HTML, or UCN (as well as the characters desired).
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.
Equivalent tools – such as gucharmap (GNOME) or kcharselect (KDE) – exist on most Linux desktop environments.
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).
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 webbrowser or application. Also, not every Unicode is available in every font.
In Microsoft Windows
In Microsoft Windows, if the registry key
HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad
has a string value of "1", holding down Alt and pressing the "plus" on the numeric keypad, followed by the hex code (using the main letter keys and any of the number keys), then releasing Alt will work.[1] (You must log off/in on Windows 7 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 ñ. 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. This also works on Microsoft Word 2002/2003 for Windows.
In Mac OS
In Mac OS X, while Finder is in the foreground, select "Edit" from the menu bar, then "Special Characters..." to open up a pane for selecting characters. Select the desired character or enter the Unicode code point in the text field at the bottom.[2] In Mac OS 8.5 and later: one chooses the Unicode Hex Input keyboard layout. Holding down the Option key, one then types the four-digit hex Unicode code point and the equivalent character appears. One can then release the option key.[3] 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.[4] To use surrogate pairs, hold down the Option key, the first surrogate, the plus key (shift key is ignored), the second surrogate and then release the Option key.
In X11
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[5]; in practice the mnemonic Compose key subsystem of X supplants it. Individual input methods and GUI toolkits can provide hex input independent of the X server.
Qt and KDE rely on the standard X Input Method (XIM) framework, and do not implement their own solutions.[6]
GTK+ is an ISO 14755-conformant system. The beginning sequence is Ctrl + Shift + U
and the ending sequence is Enter
. 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 typeu
followed by the four hex digits. Then releaseCtrl + Shift
. - Hold
Ctrl + Shift
and typeu
. ReleaseCtrl + Shift
. Then type the four hex digits, and pressEnter
.
In OpenOffice.org and Inkscape, for example, only the second method works.
In a terminal, these input methods may not be supported, but using escape sequences is an alternative.
In platform independent applications
- In the Vim editor, 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 ofCtrl-V
.[7])
The capability of Vim to create custom digraphs, as described below, which could be employed on an ad-hoc basis, requires the decimal code point.
Character mnemonics
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 digraphs, that is, two characters long, and most (416) of the remaining are trigraphs. While never complete, and targeting obsolescent set definitions, the mnemonics themselves can still be used.
- Vim allows digraph entry 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'digraph'
option is set, by entering the first character followed by a backspace followed by the second character. Custom digraphs can also be defined for arbitrary code points. (For example, "dig Gr 9881" associates "Gr" with U+2699 ⚙ gear.)
- GNU Emacs allows digraph entry by switching to rfc1345 input mode (by default
C-x C-\
).
- GNU Screen allows digraph entry with (by default) Ctrl-A Ctrl-V.
- Zsh allows digraph entry using the
insert-composed-char
widget.
RFC 1345 predates the introduction of the Euro sign (€, U+20AC), but the above applications included it as digraph "Eu".
Specialized tools
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.
See also
External links
- 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
References
- ^ How to enter Unicode characters in Microsoft Windows
- ^ [1]
- ^ 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