Inserting Unicode chars
Submitted by Monday, 7 November, 2005 - 15:52
on
How do I insert a Unicode character, if I know the hex code for it?
For example, U+00E7 (= c cedilla), or U+0BB1 (in the Tamil range).
Things I have tried:
(1) Entering the Unicode codes (e.g. \U+00E7) into the replace field of the find-and-replace dlg. (IMHO, this is the way it *ought* to work; it's what you do in Visual Slickedit, for example.) But instead, this just gives me the string "\U+00E7" in my buffer.
(2) Copying and pasting from the Unicode consortium charts. But the charts are in PDF, and don't seem to support cut-and-paste. (I'm aware of Unibook, a wonderful tool, but for the moment I can't use that, for reasons I won't go into...)
(3) Modifying the code at http://community.jedit.org/?q=node/view/2115. Specifically, I tried doing a find/replace where the replace string is
(char)Integer.parseInt(0xe7,16)
(and variants thereof); but I get an error msg
Static method parseInt( int, int ) not found in
class'java.lang.Integer
Not being a Java programmer, I'm not sure what to do with this error msg. I suppose I need to install some Java code or other, but I'd really rather not do that (not to mention that this is a *really* clumsy way to do find-and-replace).
(4) Macros | Misc | HexConvert, entering the string
0xE7
(and variants...). But I get the error msg
0xE7 is not a valid hex string.
(If that isn't valid, what is?!!)
(5) The CharacterMap plugin. When I choose the 8859-1 encoding in this plugin's dlg box, I can paste in the c-cedilla (which fortunately happens to be the same hex code as the Unicode c-cedilla). But when I choose UTF-8 encoding, it only gives me the Basic Latin box, and trying to paste in s.t. from the high end of that gives me U+FFFD. And of course Tamil characters (etc.) are not in the Basic Latin part of Unicode.
So how do I enter arbitrary Unicode characters in jEdit? Please note that I'm not trying to set up a keyboard for this, I just have to enter a single character from time to time (or do find-and-replace, where either the 'find' or the 'replace' field contains a Unicode char).
For example, U+00E7 (= c cedilla), or U+0BB1 (in the Tamil range).
Things I have tried:
(1) Entering the Unicode codes (e.g. \U+00E7) into the replace field of the find-and-replace dlg. (IMHO, this is the way it *ought* to work; it's what you do in Visual Slickedit, for example.) But instead, this just gives me the string "\U+00E7" in my buffer.
(2) Copying and pasting from the Unicode consortium charts. But the charts are in PDF, and don't seem to support cut-and-paste. (I'm aware of Unibook, a wonderful tool, but for the moment I can't use that, for reasons I won't go into...)
(3) Modifying the code at http://community.jedit.org/?q=node/view/2115. Specifically, I tried doing a find/replace where the replace string is
(char)Integer.parseInt(0xe7,16)
(and variants thereof); but I get an error msg
Static method parseInt( int, int ) not found in
class'java.lang.Integer
Not being a Java programmer, I'm not sure what to do with this error msg. I suppose I need to install some Java code or other, but I'd really rather not do that (not to mention that this is a *really* clumsy way to do find-and-replace).
(4) Macros | Misc | HexConvert, entering the string
0xE7
(and variants...). But I get the error msg
0xE7 is not a valid hex string.
(If that isn't valid, what is?!!)
(5) The CharacterMap plugin. When I choose the 8859-1 encoding in this plugin's dlg box, I can paste in the c-cedilla (which fortunately happens to be the same hex code as the Unicode c-cedilla). But when I choose UTF-8 encoding, it only gives me the Basic Latin box, and trying to paste in s.t. from the high end of that gives me U+FFFD. And of course Tamil characters (etc.) are not in the Basic Latin part of Unicode.
So how do I enter arbitrary Unicode characters in jEdit? Please note that I'm not trying to set up a keyboard for this, I just have to enter a single character from time to time (or do find-and-replace, where either the 'find' or the 'replace' field contains a Unicode char).