79
32
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.
1This 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 – 2009-07-26T07:47:41.570
1That's useless to me when I need to type a u+23AF. – None – 2009-07-27T12:35:53.153
4
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) -- http://www.fileformat.info/info/unicode/char/0041 So, using the Alt-trick works fine for decimal codes, but not for hexadecimal codes.
– Arjan – 2009-07-27T13:08:15.3831@Will: the "alt+NN..." method expects decimal, not hex notation of the character position. Unicode uses hex. So if you want to type what Unicode represents as "U+23AF" you need to convert hex==23AF into decimal==9135, and then type "alt+9135". That's the only general method there is on offer. *But:* You wanted character may still not appear as expect in the text field or document, if your currently selected font does not have the "U+23AF" place filled (or if it is not a Unicode font in the first place!). – Kurt Pfeifle – 2010-06-25T22:45:04.850
@Arjan: you do not type *hex* chars with the "alt+nnn" method. You do only type *decimal* character codes. That's why you cannot type even straight "U+1234" strings (which do not contain any of your loathed "a-f" characters) into your numeric keypad as "alt+1234", but you need to convert hex==1234 into dec==4660 and then type "alt+4660" before you (MAY) get what you want. So your statement "using the Alt-trick does not work for hexdecimal codes" nails the problem exactly, but you missed to understand it yourself :-) – Kurt Pfeifle – 2010-06-25T22:49:28.757
And for those who came here looking to disable
– Samuel Harmer – 2018-08-18T10:14:15.547Control + Shift + u
this is discussed here.