Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In OS X, how do I enter a second-plane Unicode character with the standard input method editor?

I want to test that my Cocoa app properly handles input outside the basic multilingual plane, and copy-pasting it is out of the question. I don't know how to key in a character outside BMP! I have set up Japanese as an input source and am able to get random Katakana or Hiragana by typing Japanese-sounding words, but that trick won't work for plane 2 characters. Pasting characters in dismisses the input method editor, so that doesn't work either. I think I actually need to enter the correct keystrokes on my US English keyboard into some language's input source (Chinese, presumably, would be a good choice). In case it's not obvious, I don't speak any Asian languages.

Here's an example of some characters in the second plane: http://www.unicode.org/cgi-bin/UnihanGrid.pl?codepoint=20000

Any unicode character above 0xffff would be acceptable for my purposes as long as I can render the glyph with a font I have or can get for free.

like image 936
George Avatar asked Jan 03 '11 19:01

George


People also ask

How do I insert a Unicode character in OSX?

On your standard Mac keyboard, just type Option and the Unicode number for the character, and the character is applied to whatever text field you're currently typing in. As an example, Mac keyboards have special symbols that indicate Control, Option, and Command (Cmd).

How do I insert a Unicode character?

Inserting Unicode characters To insert a Unicode character, type the character code, press ALT, and then press X. For example, to type a dollar symbol ($), type 0024, press ALT, and then press X. For more Unicode character codes, see Unicode character code charts by script.

What is a Unicode character on a keyboard?

Unicode input is the insertion of a specific Unicode character on a computer by a user; it is a common way to input characters not directly supported by a physical keyboard. Unicode characters can be produced either by selecting them from a display or by typing a certain sequence of keys on a physical keyboard.


1 Answers

You can easily manually enter any Unicode character by enabling the Character Viewer panel. In OS X 10.6, go to System Preferences -> Language & Text -> Input Sources and in the list of input methods on the left, click enable Keyboard & Character Viewer and on the right side, Show Input menu in menu bar. That should add an item to the upper right side of the standard OS X menu bar. You can then click on it to select the Character Viewer. In the panel that appears, select View -> Code Tables. Then, in the Unicode tab, you can scroll down to any code point, including those outside the BMP. Select that character and click on Insert to insert it into a text field like this one: 𠈄.

like image 111
Ned Deily Avatar answered Sep 23 '22 23:09

Ned Deily