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

1

6

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.

Bolanos answered 3/1, 2011 at 19:35 Comment(1)
You can use Ctr+Cmd+Space to quickly open Character Viewer. Click the top-right button to switch to extended mode, then click the ⚙️ button > Customize list in order to add the Unicode sets you are interested in.Penetrating
C
4

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: 𠈄.

Cryogen answered 3/1, 2011 at 23:4 Comment(3)
(I hope I didn't write something impolite there!)Cryogen
That's perfect. Thanks, Ned! Here is a plane 2 Chinese character as a gift of thanks: 卉Bolanos
Great! An even better gift would be to mark the answer as accepted. That way we both enhance our reputations.Cryogen

© 2022 - 2024 — McMap. All rights reserved.