防止表情符号显示 [英] Prevent Emoji Characters from Showing

查看:124
本文介绍了防止表情符号显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序使用一些特殊的uniode字符,但从iOS 5这些已经替换为表情符号字符。如何强制显示unicode字符,而不是表情符号字符?感谢

I use a few special uniode chars in my app, but since iOS 5 these have been replaced with emoji characters. How can I force the unicode characters to be displayed and not the emoji characters? Thanks

推荐答案

这是一个老问题,但最近困扰我很久,直到找到答案。

This is an old question but it plagued me a lot recently until I found the answer.

只需在我们想要防止成为表情符的字符后添加'\U0000FE0E'。

Just add '\U0000FE0E' after the character that we want to prevent from becoming an emoji.

例如:

@"▶"  // should be written as:
@"▶\U0000FE0E"

使用转义的unicode也可以:

Using the escaped unicode works as well:

@"\u25B6"  // should be written as:
@"\u25B6\U0000FE0E"

我们需要使用Unicode变体来防止某些字符成为表情符号。

We need to use Unicode variants to prevent certain characters from becoming emoji.

这是解决我的问题的文章

这篇关于防止表情符号显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆