在 OS X 中,如何使用标准输入法编辑器输入第二平面 Unicode 字符?
我想测试我的 Cocoa 应用程序是否可以正确处理基本多语言平面之外的输入,并且复制粘贴它是不可能的。我不知道如何键入 BMP 之外的字符!我已将日语设置为输入源,并且可以通过输入听起来像日语的单词来获得随机片假名或平假名,但该技巧不适用于 Plane 2 字符。粘贴字符会关闭输入法编辑器,因此这也不起作用。我想我实际上需要将美式英语键盘上的正确击键输入到某种语言的输入源中(中文大概是一个不错的选择)。如果不是很明显的话,我不会说任何亚洲语言。
以下是第二平面中一些字符的示例:http://www. unicode.org/cgi-bin/UnihanGrid.pl?codepoint=20000
任何高于 0xffff 的 unicode 字符对于我的目的来说都是可以接受的,只要我可以使用我拥有的或可以免费获得的字体呈现字形。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以通过启用
字符查看器
面板轻松手动输入任何Unicode字符。在 OS X 10.6 中,转到系统偏好设置 ->语言与文字->输入源
,然后在左侧的输入法列表中,单击启用键盘和输入法。字符查看器
,在右侧,在菜单栏中显示输入菜单
。这应该会在标准 OS X 菜单栏的右上角添加一个项目。然后您可以单击它来选择字符查看器。在出现的面板中,选择“查看”->“查看”。代码表。然后,在Unicode
选项卡中,您可以向下滚动到任何代码点,包括 BMP 之外的代码点。选择该字符并单击插入
将其插入文本字段,如下所示:You can easily manually enter any Unicode character by enabling the
Character Viewer
panel. In OS X 10.6, go toSystem Preferences -> Language & Text -> Input Sources
and in the list of input methods on the left, click enableKeyboard & 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, selectView -> Code Tables
. Then, in theUnicode
tab, you can scroll down to any code point, including those outside the BMP. Select that character and click onInsert
to insert it into a text field like this one: ????.