如何将旧的表情符号编码转换为iOS5中的最新编码? [英] how to convert the old emoji encoding to the latest encoding in iOS5?

查看:165
本文介绍了如何将旧的表情符号编码转换为iOS5中的最新编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可悲的是,在iOS5终于发布之后,我收到了用户的报告,他们无法登录。

sadly, after iOS5 finally released, I got report from my users that they can not login.

因为这里有表情符号,苹果更改了表情符号的编码。

Because there is emoji symbol in there names, and apple changed the encoding of emoji.

所以有用户名包含一个老版本的表情符号,我该怎么把它们转换成新的编码?

so there username contains a old version of emoji, how could I convert them to the new encoding?

谢谢!

具体:一个表情符号虎,它是iOS5中的\U0001f42f,而较早的iOS版本为\\\。

be specific: one emoji symbol "tiger", it is "\U0001f42f" in iOS5, but "\ue050" in earlier iOS version.

推荐答案

iOS 5和OS X 10.7(Lion)使用Unicode 6.0标准统一代码点表情符号。

iOS 5 and OS X 10.7 (Lion) use the Unicode 6.0 standard ‘unified’ code points for emoji.

iOS 4在SoftBank上使用iPhone的Unicode私人使用区域中的非官方代码点,因此与任何其他系统不兼容。要将此格式转换为正确的Unicode 6.0字符,您需要在Softbank代码上运行一个大的查找表,将统一的所有当前数据和所有新的表单数据提交给Unified。您可能还想在此处执行Unicode归一化,这样就可以。全文字母与普通ASCII字母相符。

iOS 4 on SoftBank iPhones used a set of unofficial code points in the Unicode Private Use Area, and so aren't compatible with any other systems. To convert from this format to proper Unicode 6.0 characters, you'll need to run a big lookup table from Softbank code to Unified over all your current data and all new form data as it gets submitted. You might also want to do Unicode normalisation at this point, so that eg. fullwidth letters match normal ASCII letters.

参见例如这个表格从一个图书馆执行PHP的表情符号转换任务。

See for example this table from a library that does emoji conversion tasks for PHP.

用户名中的表情符号?

Emoji in usernames though?

这篇关于如何将旧的表情符号编码转换为iOS5中的最新编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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