who is that character?
If I want to type $a \times b$ without spelling out \times
, here in
this lovely magical future, I should just be able to type ×. There
are different ways to do such things. What are they? Of course there
are websites. But I want command-line tools.
Well, I can always use hexdump
— once I've remembered how to use
hexdump
. But all that tells me are bytes, which I can never
interpret.
There's uniname
, from uniutils, which does things like
$ echo +×⋅/÷= | uniname character byte UTF-32 encoded as glyph name 0 0 00002B 2B + PLUS SIGN 1 1 0000D7 C3 97 × MULTIPLICATION SIGN 2 3 0022C5 E2 8B 85 ⋅ DOT OPERATOR 3 6 00002F 2F / SOLIDUS 4 7 0000F7 C3 B7 ÷ DIVISION SIGN 5 9 00003D 3D = EQUALS SIGN 6 10 00000A 0A LINE FEED (LF)
How can I get from these name and encodings to being able to type, rather than paste?
I'm mostly using Linux through the WSL on Microsoft computers. I know about the "alt codes," but there's never a handy enough table of them. The Character Map is a pretty terrible interface — although now that I have a tool for finding names, it might be better.
In some Windows tools, typing alt-X with the cursor next to a hexadecimal number will swap that number for the equivalent Unicode symbol. It works in Notepad. But it doesn't work in the terminal.
Surely there's an emacs
command for inserting unicode? Then I'm
platform-independent. And of course there is:
On Emacs 23, type Ctrl+X 8 Enter and then the number, followed by Enter. Learned this from Emacs and Unicode Tips, which describes other methods too. (Ctrl+X 8 Enter can be followed by Unicode name as well.)
There are indeed other methods, including
Accents.
C-x ' e
givesé
, andC-x 8 ~ n
givesñ
.Related characters, like
C-x 8 x
for×
andC-x 8 S
for§
.Emoji! (in Emacs 29, which is newer than what I'm running here.)
M-x set-input-method
to just plain type in some other language.
Whoa, I think that emoji are silly enough for me to figure out the
backports setup again.
… And now, C-x 8 ee
pulls up an emoji menu 🙃!