简体   繁体   English

IOS是否支持所有Unicode表情符号?

[英]Does IOS support all Unicode emojies?

Hello All, 大家好,

I have a problem regarding Unicode characters . 我有关于Unicode characters的问题。 I'm able to append Apple Art Work Unicode Characters in UITextView . 我可以在UITextView附加Apple Art Work Unicode Characters Like this : - 像这样 : -

self.textView.text = @"\ue00A";

It is Okay. 没关系。 But now i have many Unicodes Characters which're not in Apple art work. 但现在我有很多Unicodes Characters而不是苹果的艺术作品。
One of them is U+1F3C7 其中一个是U+1F3C7
Now I'm trying to show it in UITextView . 现在我试图在UITextView显示它。

self.textView.text = @"\u1f3c7"; 

Then it is showing me an Special Character instead of Emoji. 然后它向我展示了一个特殊字符而不是表情符号。
Unicode表情符号

This is the Emoji Icon of this Unicode But it is showing me Ἴ7 . 这是这个Unicode的表情符号图标但它显示我Ἴ7

Apple doesn't support all Unicode Characters ?
How can I add my own emojies in my application ?

Let me know if my question is not clear for you. 如果我的问题不清楚,请告诉我。

Doesn't Objective-C use UTF-16 internally, like Java and C#? Objective-C内部是否使用UTF-16,如Java和C#?

If so, then U+1F3C7 wouldn't be "\Ἴ7", but the surrogate-pair, "\?\?". 如果是这样,那么U + 1F3C7将不是“\\ u1f3c7”,而是代理对,“\\ uD83C \\ uDFC7”。

Otherwise, there has to be some way to indicate a higher character, because "\Ἴ7" is the same as "\Ἴ" + "7" , which is Ἴ7 (capital iota with psili and oxia, then 7). 否则,必须有某种方式来表示更高的字符,因为"\Ἴ7""\Ἴ" + "7" ,即Ἴ7 (带有psili和oxia的资本iota,然后是7)。

Edit: After some discussion between the OP and myself, we figured out that the way to do this in Objective C is one I know as the C++ way: 编辑:在OP和我之间进行一些讨论之后,我们发现在Objective C中执行此操作的方法是我所知道的C ++方式:

"\U0001F3C7"

( \\uXXXX with a small u and 4 hex digits works if it fits in thos 4 hex digits, \\UXXXXXXXX with a capital U and 8 hex digits works for everything, but is longer to type). \\uXXXX带有小u和4个十六进制数字,如果它适合4个十六进制数字, \\UXXXXXXXX带有大写U和8个十六进制数字适用于所有内容,但输入时间较长)。

Now our friend just needs to deal with the matter of font support, which alas is another problem in getting this to actually look as he wants. 现在我们的朋友只需要处理字体支持的问题,唉,这是另一个问题,让它实际上看起来像他想要的那样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM