Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This is in Windows, but answers for other operating systems can be handy to others.

Most guides say something to the effect of "hold down the Alt key and type in the code on the keypad". This works fine for decimal codes (like 65 for 'A'), but not for hexadecimal codes (like U+0041 for 'A').

Some applicatons provide other facilities that will allow hexadecimal Unicode character codes to be typed and then transformed. Word allows you to type the code (such as 200f) and then convert it to Unicode by typing Alt-X.

I'm looking for a general method of doing this that will work with the standard input.

share|improve this question
    
This works fine for unicode characters that don't include hex chars A through F. should read: for decimal codes. There are plenty of hexadecimal numbers that don't use A-F. Like 10, which is not ten then... –  Arjan Jul 26 '09 at 7:47
1  
That's useless to me when I need to type a u+23AF. –  Will Jul 27 '09 at 12:35
2  
My point is: you cannot type things like u+0041 (hex 41, decimal 65) using the numeric keypad either (as one would then need to type 65 rather than 41) -- fileformat.info/info/unicode/char/0041 So, using the Alt-trick works fine for decimal codes, but not for hexadecimal codes. –  Arjan Jul 27 '09 at 13:08
    
@Arjan: sorry but this is not true. See harrymc's answer below for how to do just that. –  romkyns Nov 6 '09 at 12:35
    
@romkyns, I know, I even linked to that Windows hack in my own answer. Odd, I just don't know how to explain any better than I tried already ;-) –  Arjan Dec 28 '09 at 16:51
show 3 more comments

6 Answers

up vote 10 down vote accepted
+100

harrymc's answer is good, providing you're able/allowed to change the registry settings.

If not, you can use the Windows Calculator Accessory to convert from hexadecimal to decimal. The default mode won't do this: XP and Vista have a "Scientific mode, whereas Win7 has a "Programmer" mode.

Select Hex base, and then type in your hexadecimal number. Then change to Dec base to see the equivalent value in decimal. That's the number you need to type into your numeric keypad while holding down the Alt key.

share|improve this answer
    
Finally! An answer that works! –  Will Jan 4 '10 at 14:01
    
you can also calculate with set /a in a command window ;-). To convert hex=4321 into decimal, just type set /a 4*16*16*16+3*16*16+2*16+1 and the result will show up as 17185 –  Kurt Pfeifle Jun 25 '10 at 22:56
1  
@Kurt, the command-prompt is (much) more likely to be locked down than the calculator. –  Synetech Jul 8 '12 at 18:10
    
Alternatively, set /a 0x4321 will also display 17185. –  Marcks Thomas Dec 13 '12 at 12:31
1  
The method using decimal numbers depends on “input language” (as a Microsoft concept), so the results vary by system and program. For example, in most Windows programs, when the system language has been set to English or other Western language, only Windows Latin 1 characters can be typed this way. Any Alt 0n for n > 255 will then work “modulo 256”, i.e. with n reduced to range 0...255 by dividing by 256 and taking the remainder. –  Jukka K. Korpela Sep 9 '13 at 5:06
show 1 more comment

Found this in How to enter Unicode characters in Microsoft Windows :

I tested this on Windows XP and Windows 2003. This method works regardless of any of your language settings, but is the most cumbersome to type:

  1. Press and hold down the Alt key.
  2. Press the + (plus) key on the numeric keypad.
  3. Type the hexidecimal unicode value.
  4. Release the Alt key.

Alas, this appears to require a registry setting. It was already set on my computer, but some readers report that this method didn't work for them, and this is probably why. If you don't know what the registry is, please don't try this. Under HKEY_CURRENT_USER\Control Panel\Input Method, set EnableHexNumpad to "1". If you have to add it, set the type to be REG_SZ.

You should log off then log on after this registry change, or even reboot.

share|improve this answer
4  
Not enough rep to edit the answer, but at least on my Win7 64-bit this required a reboot before it had any effect. –  romkyns Nov 6 '09 at 12:36
1  
if I don't know what the registry is, then I don't know how to try neither. –  Vanuan Apr 6 '12 at 17:28
1  
If you don't know what the registry is, you shouldn't ever touch it. Ask someone you know for help. –  Wug Apr 17 '13 at 18:07
add comment

Linux (including Qt/KDE applications)

As JMD mentioned, you can hold down Ctrl-Shift, type u1f4a9, and release in order to type U+1F4A9 in GTK+ applications (including GNOME programs, Firefox, Chromium, and LibreOffice, even under KDE). Some programs also support typing in sequence Ctrl-Shift-U, 1, f, 4, a, 9, Enter.

Unfortunately, this doesn't work in Qt applications (including KDE programs, Mathematica, and VLC). For BMP characters, there is a Unicode IBus input method. To enable, open IBus preferences and add the "Other - unicode (m17n)" input method (the two packages ibus-m17n and ibus-qt4 must be installed). When the cursor is in a text area, activate the input method (using the IBus toolbar or the keyboard shortcut). While active, the input method lets you type Ctrl-Shift-U followed by 4 hex digits, to input the corresponding Unicode character. This only works for BMP characters, though.

(Tested under Ubuntu.)

share|improve this answer
    
Doesn't work on KDE for me.. –  Jack May 22 '13 at 1:17
add comment

It also depends where you want to use the special characters. With MS Office apps, you don't have to resort to knowing the ASCII codes for certain characters -- for example, to type a diaresis (i.e., the two dots you see above some characters in words such as naïve), in Word/Outlook/etc you can hit Ctrl + ':' (i.e., Ctrl+Shift+;) followed by 'i'.

There's a list of shortcuts available at http://word.mvps.org/FAQs/General/InsertSpecChars.htm ... just scroll down to "International Characters".

I don't know whether any non-Office apps support similar shortcuts.

share|improve this answer
add comment

In Ubuntu (and variants thereof, like LinuxMint) you can enter Unicode values by pressing Ctrl+Shift+u followed by the Unicode value and Enter, for example:

Ctrl+Shift+u 263a then Enter yields:

Text: ☺
Screenshot: alt text

You might be able to couple this with AutoHotkey for easier input, or possible input in Windows.

share|improve this answer
    
+1, that works!!! Great! Ubuntu 12.04. Thank you! –  Sony Santos Jul 24 '12 at 5:14
    
Unfortunately it only works in GTK+ applications. –  Mechanical snail Nov 28 '12 at 0:25
1  
You can also hold down Ctrl-Shift while typing the code, which avoids having to press Enter afterwards. –  Mechanical snail Nov 28 '12 at 0:27
    
I have found a better solution: You can add accent marks to any preceding character using Unicode combining diacritical marks. Unicode 0301 - 0308 are useful for Pinyin. for example: "a" + [ctrl][shift][u] + 0301 [return] -> á. The pinyin list: ó -> 0301; ò -> 0300; ō -> 0304; ŏ -> 0306; ö -> 0308; see en.wikipedia.org/wiki/Combining_character#Unicode_ranges –  e.m.fields Feb 1 '13 at 4:22
add comment

On Mac OS X: open International in System Preferences, and in Input Menu select "Unicode Hex Input" to add this option to the input menu. Sounds obvious, but this is well hidden in the long list of languages, between Ukrainian and Vietnamese. When selected, hold down Option and type the 4 digit hex code.

Also on OS X: Calculator can be set to Programmer mode (Cmd-3), which allows for entering decimal, octal and hexadecimal codes, which are then displayed as ASCII or Unicode. However, Copy will give one the code, not the character equivalent(s). Anyone?

(For Windows, see How to enter Unicode characters in Microsoft Windows; for other input methods see Wikipedia.)

And here on Super User:

And to go into extremes:

share|improve this answer
add comment

protected by Diago Oct 21 '10 at 19:40

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.