ios客户端 和 php服务端 如何处理 emoji表情?
阿神
阿神 2017-04-17 13:26:25
0
6
708

网上搜索了大堆资料,百度搜索出来都是重复的文章。这时候有点想念谷歌了。

网上的方案有什么开源的 emoji for php、或者修改数据表字段等等等,全都不管用,或者不符合我的需求

1、ios发送带emoji表情的字符串,php接收,怎样处理?以怎样的格式保存进数据库里面?
2、php查询出来,以怎样的格式返回给ios客户端?

我想知道做类似项目的同志们,你们是如何解决这个问题的?

阿神
阿神

闭关修行中......

reply all(6)
伊谢尔伦

The so-called Emoji expressions are UTF-8 encoded strings. Just transfer them as usual. Just choose UTF-8 encoding when storing in the database. Let’s see how Baidu transfers the URL:
http://www.baidu. com/s?wd=%F0%9F%98%8A&tn=84053098_dg&ie=utf-8

Ty80

Look at this
https://github.com/diy/NSStringEmojize

巴扎黑

The client can directly transmit it to the server without processing. The storage method of the server must correspond. It can also be converted into your own corresponding characters like the one above and passed to the server, and then parsed locally

阿神

It is related to the character set. Your character set can support storing varchar

PHPzhong

mysql is stored in it or ????

刘奇

Just change the field type stored in the database, varchar should be fine

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template