Okay. I have to share this. It's just too cool not to.
All day today, I was struggling with how to enter Unicode characters in Linux. I really didn't have any reason other than I just wanted to learn. And it didn't make sense to me why it wasn't easy. I just figured entering any Unicode character from the keyboard wouldn't really be that hard. I mean, don't the Chinese, and other languages use Unicode all the time? So it shouldn't be that hard. Not that I speak Chinese or anything, I was just curious.
Well, after digging around the Internet, I found it. It took a great deal of time to find, though. Believe me, this is not heavily documented, as the English language really doesn't rely on Unicode. But the neat thing, is you can use the following keyboard sequence in just about any Gtk+ application. OpenOffice.org, Gnome Terminal, GEdit, Firefox, and so on. So, it could come handy when you want to enter cents instead of dollars, or an actual smiley face rather than colon+paren. At any event, here's how you do it:
Hold down 'ctrl' & 'shift' the entire time while entering the character. While holding them down, press 'U' then the 4 digit octal code for the character. For example, if I want to display the Unicode cent ¢, you would type 'ctrl+shift+U+00A2' then release. You can find plenty of Unicode characters at the official Unicode site or by typing 'gnome-character-map' in a Linux terminal.
Fairly easy, no? The great thing, is the Unicode characters can be entered from just about any scenario. For example, a Windows keyboard connected through Synergy to a Linux computer will work. The Unicode character can be entered inside of screen. Irssi recognizes the Unicode characters just fine, which is a nice addition to my screen digraphs here.
One use that I will have for them is when connected to IRC. It's fun to "show off" the ASCII skillz. Luckily, with irssi, for commonly used Unicode characters, I can setup tab completion. All I need is one letter to start it off, hit 'Tab', and irssi will finish the rest leaving a Unicode character. For example, if I want the ever-so-cool smiley ã‚· (which is really a Katakana Unicode character), then I need 'ctrl+shift+U+30B7':
/completion : ã‚·
Now when I type the colon :, and hit 'Tab', the Katakana Unicode character will be completed for me. This is handy for a TON of Unicode characters, such as the heart, the cent, the British pound and many more.
I hope this is helpful. If it was, please, leave a comment below, and let me know. Of course, if you have cool tips and tricks, those are welcome too. 🙂 Er, I mean, シ.
{ 14 } Comments
FYI, it also works in gaim. I'm more of a fan of U30C4 ツ
so rude... baby~
shuray123- what's rude?
Thanks for the tip! I've been in need of a quick way to type up my Spanish homework!
PS - It's hex, not octal.
greetings from ☼♖
I know this is a really late comment (but looks like some others are, too) but I was trying it out, turns out you only need to hold down ctl-shift-u, once you press u, you can let go for the number part. Also my favorite place to find unicode characters is http://www.fileformat.info/info/unicode
Hey, but this does not work in eclipse. Any clues on how to make it work there?
Excellent tutorial. It should work anywhere i'm not sure what kind of special case eclipse is. But this work's wonderfully.
This is a informative post about colon cleansing and there side effect.
Thanks for sharing such an informative post.
Great Article. You are true, Finding Information about Unicode is not an one time googling.
ã‚·
Works fine here shift+ctrl+u+2107 gives ℇ (in firefox3) but otherwise not much use as fails to work in openoffice.org3, kword, kate or kontact under kubuntu8.04
ã‚·
no idea why that should be!
This was very helpful, thank you!
nice to knoѼ.
@Trantor, For Eclipse, this worked for me.
To enter a unicode character, do these steps
1. Hold down the
2. Hit the u character and then release the key. Note that you should
still be holding down the key only.
3. Enter the four characters (hex values) and then release the control key.
Post a Comment