emoji

MySQL异常问题解决方案小结

时间秒杀一切 提交于 2019-11-30 08:31:54
1.Mysql中文存储乱码 默认编码latin1,需修改my.conf重启服务 character-set-server = utf8 collation-server=utf8_general_ci 设置是否成功,可用以下命令查看: SHOW VARIABLES LIKE 'character_set_%' SHOW VARIABLES LIKE 'collation_%' 2.Mysql emoji表情数据存储异常 使用Emoji表情时应注意,普通UTF-8为3字节unicode,而Emoji表情符号是4字节unicode,因此UTF8编码无法存储Emoji,此时需将Mysql服务端编码改为utf8mb4(Mysql5.5.3以上版本支持) character-set-server = utf8mb4 column字段编码修改方法: ALTER TABLE tablename CHANGE column_name VARCHAR(100) CHARACTER SET utf8mb4; 3.Mysql启动错误:Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist. 解决方法,在mysql的安装时设置datadir与用户目录读写权限 ./scripts/mysql

How can I search by emoji in MySQL using utf8mb4?

混江龙づ霸主 提交于 2019-11-30 08:28:24
Please help me understand how multibyte characters like emoji's are handled in MySQL utf8mb4 fields. See below for a simple test SQL to illustrate the challenges. /* Clear Previous Test */ DROP TABLE IF EXISTS `emoji_test`; DROP TABLE IF EXISTS `emoji_test_with_unique_key`; /* Build Schema */ CREATE TABLE `emoji_test` ( `id` int(11) NOT NULL AUTO_INCREMENT, `string` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `status` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; CREATE TABLE `emoji_test_with_unique_key` (

How can I put utf-16 characters in Android string resource?

倾然丶 夕夏残阳落幕 提交于 2019-11-30 06:48:50
I want to use Emojis in my app's strings. All strings reside, of course, in strings.xml The problem is that not all Emojis are 16 bit friendly. Some Emojis can be represented as "normal" 16 bit hex: '\u26FF' but some are 32 bit hexes (UTF-16), usually represented as: '\x1F600' . I have no problem dealing with those inside the app, in code. But the strings.xml resource file is UTF8 encoded, and does not deal properly with non 16 bit escape chars. I tried using '\x1F600' - because I saw that '\u26FF' works just fine. But it seems not to devour the 'x' escape char. Nor did it like the regexp

Additional Icon in App Name/Lable

二次信任 提交于 2019-11-30 06:42:39
问题 How can I add an additional icon to the Name/Lable of app, just the like snapshot of my test device Home screen (see highlighted Water app, in the attached screenshot). You can see that there is a small icon at the end of App Name/Label. PS: I'm not sure, if its part of the Application icon, or there is some way to add an additional icon to App Name/Label. Thanks! 回答1: This is an Emoji character. See Emoji on Wikipedia and iOS: Understanding emoji for more information about these. They are

Send unicode emoji with PHPMailer

余生长醉 提交于 2019-11-30 05:22:50
问题 I'm trying to send unicode emoji trough PHPMailer (5.2) but the emails I sent are received with weird characters instead of emojis. I'm currently sending HTML emails where I just echo a string containing some utf-8 emoji and inspecting the email source the string seems to be printed correctly. For example: echo "😁"; produces: =F0=9F=98=81 in the email source code (which should be OK). 回答1: It turns out that PHPMailer uses charset=iso-8859-1 by default in HTML emails (in the email header you

Detecting *all* emojis

谁说胖子不能爱 提交于 2019-11-30 03:51:00
Right now I'm using this piece of code : public static bool ContainsEmoji(this string text) { Regex rgx = new Regex(@"\p{Cs}"); return rgx.IsMatch(text); } And it's being somewhat helpful. Most of them appear to be detected, but some aren't. Here's a reference list to help : http://unicode.org/emoji/charts/full-emoji-list.html All the smiley faces appear to be fine, but these specific emojis do not get caught by the Regex : 1920 U+2614 ☔ umbrella with rain drops 1921 U+26F1 ⛱ umbrella on ground 1922 U+26A1 ⚡ high voltage 1923 U+2744 ❄ snowflake On the keyboard these are not close to each other

Regular expression matching emoji in Mac OS X / iOS

落爺英雄遲暮 提交于 2019-11-30 03:49:22
问题 Note: this question could look odd on systems not supporting the included emoji. This is a follow-up question to How do I remove emoji from string. I want to build a regular expression that matches all emoji that can be entered in Mac OS X / iOS. The obvious Unicode blocks cover most, but not all of these emoji: U+1F300..U+1F5FF Miscellaneous Symbols And Pictographs U+1F600..U+1F64F Emoticons U+1F650..U+1F67F Ornamental Dingbats U+1F680..U+1F6FF Transport and Map Symbols Wikipedia provides a

Emoji symbol 👍 in string.xml crashes app

谁都会走 提交于 2019-11-30 01:10:29
问题 I would like to integrate the emoji symbol 👍 in my android app. Therefore I looked up the hex code for the utf-8 symbol and added the following to my string.xml file: <string name="thumbsup">Perfect <node>👍👍</node></string> This should result into Perfect 👍👍 . However, instead my app crashes when the call activity tries to display this: JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal start byte 0xf0 Not particularly perfect ;) 回答1: The fix for that is: Add "-

How to detect when user changes keyboards?

余生颓废 提交于 2019-11-29 21:57:27
Is there some way to detect when the user changes keyboard types, specifically to the Emoji keyboard in this case? You can use UITextInputMode to detect the current language of the currentInputMode -- emoji is considered a language. From the docs : An instance of the UITextInputMode class represents the current text-input mode. You can use this object to determine the primary language currently being used for text input. You can test for the emoji keyboard like this: NSString *language = [[UITextInputMode currentInputMode] primaryLanguage]; BOOL isEmoji = [language isEqualToString:@"emoji"];

Sending Emoji in Push Notifications via PHP on iOS

雨燕双飞 提交于 2019-11-29 16:01:04
问题 I'd like to send some emoji icons with push notifications, but have no idea how I do that. Has anyone successfully implemented this with PHP? I just want to prepend my push message with a smiley face for example. My question is purely about emoji, I have a successful APNS script. Thanks for any guidance. 回答1: There's a quick 'n dirty way to do this using html_entity_decode() : Example: $lightning = html_entity_decode('',ENT_NOQUOTES,'UTF-8'); //add this to the 'alert' portion of your APNS