emoji

Storing and showing emojis in Android application using MySQL

情到浓时终转凉″ 提交于 2020-01-11 14:36:27
问题 I have an application talking to a NodeJS server via socket, that server is talking to PHP via HTTP, and that PHP is using MySQL. When I try to insert Emojis in a text field, and save it to DB, when I get it back I see "?". If I copy Emojis from wikipedia (for example ✒️ ❤️ 🀄️ 🈚️ ) and force them to the DB, when I select them it shows ✒️ ❤️ ?️ ?️ Note: The field in DB is utf8mb4bin . Why can't I store emojis directly from my device to DB? Why does some emojis show, while others don't? Note :

php extract Emoji from a string

被刻印的时光 ゝ 提交于 2020-01-11 05:48:08
问题 I have a string contain emoji. I want extract emoji's from that string,i'm using below code but it doesn't what i want. $string = "😃 hello world 🙃"; preg_match('/([0-9#][\x{20E3}])|[\x{00ae}\x{00a9}\x{203C}\x{2047}\x{2048}\x{2049}\x{3030}\x{303D}\x{2139}\x{2122}\x{3297}\x{3299}][\x{FE00}-\x{FEFF}]?|[\x{2190}-\x{21FF}][\x{FE00}-\x{FEFF}]?|[\x{2300}-\x{23FF}][\x{FE00}-\x{FEFF}]?|[\x{2460}-\x{24FF}][\x{FE00}-\x{FEFF}]?|[\x{25A0}-\x{25FF}][\x{FE00}-\x{FEFF}]?|[\x{2600}-\x{27BF}][\x{FE00}-\x{FEFF}

小程序中如何使用Emoji表情

≡放荡痞女 提交于 2020-01-07 13:17:37
小程序中如何使用Emoji表情 在小程序开发的过程中,类似商城、社区之类的项目,大多数都遇到过使用emoji表情的需求,我在网上查找到一些文章,给了我一些灵感,以下就是使用表情的步骤。 参考文章链接--->https://blog.csdn.net/qq_33744228/article/details/80335440 一、首先去相应的emoji表情网站寻找自己需要的表情 Emoji表情网址-->http://www.oicqzone.com/tool/emoji/ 在网站中,红框一栏中的表情是可以直接复制到js中进行使用的,但是需要使用引号包起来,因为这种类型的属于字符串表情,可以直接以字符串形式展示,如下图 二、把表情一一对应的放到字符串中后,可以声明一个数组把相应的数字与emoji对应起来,当然,这一步其实可以稍微省略,可以直接把表情与数字结合,做成数组对象,使用起来更方便,直接写在json文件进行请求或者在声明变量的时候写好就行,这里还是用的原来的方法,上图中已经定义好表情符号了,下图是对应的数字ID以及对应的变量 三、当把两样东西都定义好后就可以通过遍历数字ID的数组,把相应的emoji表情以及数字ID存入到一个对象中推到数组中去,如下图 页面的结构,我是使用了小程序中的scroll-view进行表情的渲染,并且使用动态高度去模拟app弹出表情的效果

cnblog部署emoji(图片版本)

非 Y 不嫁゛ 提交于 2020-01-07 08:35:27
版本 图片。如果有svg格式的,请给我留个言,分享一下资源! 部署效果 书写格式: <span>[微笑]</span> --> [微笑] 而且会随着字体的变大而变大<h1>中部署的效果: <h1>微笑一下:<span>[微笑]</span><h1> --> 微笑一下: [微笑] 资源来源 https://www.cnblogs.com/wbl001/p/11457460.html 部署过程 部署位置 在cnblog的设置界面中填写css和js部分。 css部分 1 .qqface { 2 display: inline-block; 3 width: 28px; 4 height: 28px; 5 font-size: 0; 6 text-indent: -999em; 7 background: url('https://xunhanliu.gitee.io/images/qqface.png') 0 0 no-repeat; 8 } 9 10 .qqface-parent { 11 display: inline-block; 12 height: 0px; 13 vertical-align: top; 14 text-align: center; 15 } 16 .qqface.small { 17 18 height: 24px !important; 19 width:

Regex to delete emojis from string

浪尽此生 提交于 2020-01-07 04:44:17
问题 I have a list of the Unicode emojis and I want to strip the emojis from them (i.e just want the whole first part and the name at the end of the row). A sample rows are like these ones: 1F468 1F3FD 200D 2695 FE0F ; fully-qualified # 👨🏽‍⚕️ man health worker: medium skin tone 1F469 1F3FF 200D 2695 ; non-fully-qualified # 👩🏿‍⚕ woman health worker: dark skin tone (from where I have deleted some spaces for the sake of simplicity). What I want is to match is the [non-]fully-qualified part as well as

带你了解什么是Push消息推送

北战南征 提交于 2020-01-07 04:38:44
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 前言 只有光头才能变强。 文本已收录至我的GitHub仓库,欢迎Star: https://github.com/ZhongFuCheng3y/3y 如果有看我最近文章的同学可能就知道我在公司负责的是一个消息管理平台(推送系统) 而Push消息是这么多种类型之中非常 重要和常用 的一种类型,最近也希望针对Push推送做些新的尝试,于是去学习学习些Push消息运营的技巧。 这篇文章主要是记一些笔记,以及希望听听你们是怎么看待Push推送的(不妨在评论区留言)。 一、什么是Push消息? Push消息是非常常见的,每个APP几乎都有此类的产品。举个例子: 二、Push消息能做什么? 一般我们认为Push消息能做以下的事情: 唤醒用户,提高用户的留存率,提高产品活跃度 。我手机下载了蘑菇街,但我似乎把它已经忘记了(好久没用了),如果此时这个APP给我推送一条我 有兴趣 的内容。我可能会继续用蘑菇街这个APP,甚至从此活跃起来(购买消费) 告诉用户我有 新的产品上线 了(带动功能模块使用率)。本来蘑菇街是做商城的,现在做起直播来了。但好多用户好像都不咋留意到,此时我推送一条直播的消息给用户,可能用户就爱起直播了。 Push消息能够在你手机闭屏时(即便你没有打开APP),通过 通知 来给你推送信息,是一种能够

修改MySQL的字符集为utf8mb4原文不存在

限于喜欢 提交于 2020-01-06 15:51:33
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 一般情况下,我们会设置MySQL默认的字符编码为utf8,但是近些年来,emoji表情的火爆使用,给数据库带来了意外的错误,就是emoji的字符集已经超出了utf8的编码范畴😄 令人抓狂的字符编码问题 谈到字符编码问题,会让很多人感到头疼,这里不在深究各个字符编码的特点和理论,这里只说下Unicode和utf8字符编码的关系 1 2 3 4 5 6 7 Unicode是编码字符集,而UTF-8就是字符编码,即Unicode规则字库的一种实现形式。 随着互联网的发展,对同一字库集的要求越来越迫切,Unicode标准也就自然而然的出现。 它几乎涵盖了各个国家语言可能出现的符号和文字,并将为他们编号。 详见:Unicode on Wikipedia。 Unicode的编号从0000开始一直到10FFFF共分为16个Plane,每个Plane中有65536个字符。 而UTF-8则只实现了第一个Plane,可见UTF-8虽然是一个当今接受度最广的字符集编码, 但是它并没有涵盖整个Unicode的字库,这也造成了它在某些场景下对于特殊字符的处理困难 简单的说在计算机内存中,统一使用Unicode编码,当需要保存到硬盘或者需要传输的时候,就转换为UTF-8编码 用记事本编辑的时候,从文件读取的UTF

Removing emoji from text remove also Japanese language

╄→尐↘猪︶ㄣ 提交于 2020-01-06 12:46:52
问题 I use the follow code: import re def replace_emoji_space(string): emoji_pattern = re.compile("[" u"\U0001F600-\U0001F64F" # emoticons u"\U0001F300-\U0001F5FF" # symbols & pictographs u"\U0001F680-\U0001F6FF" # transport & map symbols u"\U0001F1E0-\U0001F1FF" # flags (iOS) u"\U00002702-\U000027B0" u"\U000024C2-\U0001F251" "]+", flags=re.UNICODE) return emoji_pattern.sub(r' ', string) While string == '趣味でバルーンひねってます' the results is just an empty string, why ? This is what I get in pycharm:

change string with picture in swift

 ̄綄美尐妖づ 提交于 2020-01-06 04:17:52
问题 I have a String in a UILabel and this string includes one or several emoji but only the name like ":cool:" or ":crazy:". How can I replace the word in the String with the .png ? func checkString(pString: String) -> String { var replaced = pString //get the String var found = "" var image = UIImage() //Emoji for i in 1...bib.count { //bib = array(Int:String) with all names of the Emoji if pString.range(of: bib[i]!) != nil { found = bib[I]! //picBib is a array(String:String) with the Emoji name

change string with picture in swift

女生的网名这么多〃 提交于 2020-01-06 04:17:10
问题 I have a String in a UILabel and this string includes one or several emoji but only the name like ":cool:" or ":crazy:". How can I replace the word in the String with the .png ? func checkString(pString: String) -> String { var replaced = pString //get the String var found = "" var image = UIImage() //Emoji for i in 1...bib.count { //bib = array(Int:String) with all names of the Emoji if pString.range(of: bib[i]!) != nil { found = bib[I]! //picBib is a array(String:String) with the Emoji name