7

I need a lightweight GUI text editor on my Ubuntu Lucid system which lets me specify a Unicode code point (e.g. U+1234), and inserts that character to a UTF-8 text document. I know that gedit can't do it (not even with the Character Map plugin).

I'm not interested in solutions involving any kind of emacs or vi. I'm also not interested in text editors running in the terminal (such as joe, which has this functionality). I need the absolute simplest, smallest and fastest plain text editor for Linux which lets me type a few letters, insert a few characters by their code, type some more letters, and then save the .txt file as UTF-8-encoded.

  • 2
    For the record: In Vim you can do this by pressing Ctrl+V, the letter “u” and the 4-character hex codepoint. – scy Aug 11 '10 at 22:33
  • For the record: in joe, if joe was started in a UTF-8 locale, a Unicode character can be inserted by pressing Escape, Apostrophe, X, hex, Enter; where hex is the code point in hex. – pts Aug 13 '10 at 7:58
13

I've found a solution which works in gedit and in the text input boxes of many other GTK-based applications. I press Ctrl+Shift+U, type the character code in hex, then I press Enter, and the character appears.

| improve this answer | |
  • 2
    An important note here: the unicode character only appears after you press enter. Until then, you see what you're typing (for example, for a non-breaking space: you would see u00a0 with the it all likely underlined ) – Randall Oct 6 '17 at 21:58
  • @Randall: Indeed, but this is hardly surprising. What other behavior would be reasonable? – pts Oct 7 '17 at 0:02
  • 2
    I was just in the frame of mind of the Windows-style method for inserting extended-ASCII (where there is nothing displayed at all on the screen until releasing the Alt key), so I initially thought something wasn't configured right in Ubuntu for entering Unicode. – Randall Oct 10 '17 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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