8

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
  • 2
    For the record: In Vim you can do this by pressing Ctrl+V, the letter “u” and the 4-character hex codepoint. Commented Aug 11, 2010 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. Commented Aug 13, 2010 at 7:58

1 Answer 1

15

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.

4
  • 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 ) Commented Oct 6, 2017 at 21:58
  • @Randall: Indeed, but this is hardly surprising. What other behavior would be reasonable? Commented Oct 7, 2017 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. Commented Oct 10, 2017 at 15:02
  • @pts LibreOffice doesn't show the numbers. It just shows a static cursor until you hit the space bar or Enter key. Just an example of different program behaviours when using Unicode input methods. Commented Jun 1, 2022 at 13:28

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.