emoji

Regular expression matching emoji in Mac OS X / iOS

我怕爱的太早我们不能终老 提交于 2019-11-30 18:50:54
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 compiled list of all the symbols available in Apple Color Emoji on OS X Mountain Lion and iOS 6 ,

Using collections.Counter to count emojis with different colors

喜你入骨 提交于 2019-11-30 18:15:48
问题 I would like to use the collections.Counter class to count emojis in a string. It generally works fine, however, when I introduce colored emojis the color component of the emoji is separated from the emoji like so: >>> import collections >>> emoji_string = "👌🏻👌🏼👌🏽👌🏾👌🏿" >>> emoji_counter = collections.Counter(emoji_string) >>> emoji_counter.most_common() [('👌', 5), ('🏻', 1), ('🏼', 1), ('🏽', 1), ('🏾', 1), ('🏿', 1)] How can I make the most_common() function return something like this instead: [(

Emoji symbol

给你一囗甜甜゛ 提交于 2019-11-30 17:07:58
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 ;) Menny The fix for that is: Add "--utf16" to aapt by adding android { aaptOptions { additionalParameters '--utf16' } } to your build.gradle

Using Emoji literals in Clojure source

丶灬走出姿态 提交于 2019-11-30 14:33:45
On Linux with UTF-8 enabled console: Clojure 1.6.0 user=> (def c \の) #'user/c user=> (str c) "の" user=> (def c \🍒) RuntimeException Unsupported character: \🍒 clojure.lang.Util.runtimeException (Util.java:221) RuntimeException Unmatched delimiter: ) clojure.lang.Util.runtimeException (Util.java:221) I was hoping to have an emoji-rich Clojure application with little effort, but it appears I will be looking up and typing in emoji codes? Or am I missing something obvious here? 😞 Java represents Unicode characters in UTF-16. The emoji characters are "supplementary characters" and have a codepoint

Increase the font size of emoji characters in a UITextView in iOS 5.x

萝らか妹 提交于 2019-11-30 13:36:48
If I have UITextView and set the font size to, say 32. When I run the application (in both simulator and on the device), I see a large cursor and text that I type appears just as I'd assume it would. But if I switch the the Emoji keyboard, they display small. Like the size of the font was never increased. I know these emoji font scales, as I've blown them up to giant proportions in OSX Lion, and if I create a UIButton with an emoji character as it's label and set the font to "Apple Color Emoji" and the size to 64, they look huge and gorgeous on my device. It seems just the UITextView isn't

special characters (emoticons) in text file

别等时光非礼了梦想. 提交于 2019-11-30 11:19:55
I have a txt file of an conversation exported from WhatsApp. WhatsApp supports emoticons in their conversation, and the exported conversation also, to my surprise, contains these emoticons! That is, if I open the text file in a text editor (Text Wrangler on Mac 10.8) I can see the emoticons. The text file is encoded in UTF-8 and there are no resources associated with the file that I can tell. Can anyone explain to me how these emoticons are being included in the text file and how they are accurately being interpreted by the Text Editor? Is this related to the character encoding at all? Are

Creating softkeyboard with custom emoji

怎甘沉沦 提交于 2019-11-30 10:27:18
I have been tasked to create a new android 3rd party keyboard that supports customized emojis (My own Icons) from assets. I want to implement a softkeyboard with my own emoji icons without using UniCode or my custom UniCode. Questions: If I create a custom emoji, with some string of characters which does not map to the standard set of emojis, and text this message to a friend with the customized app/keyboard, what shows up on their device? The regular ASCII characters string? or the image. I have read two ways to add image to textView. Html.ImageGetter Spannable Image (String consisting of

Why can't Emoji display correctly in a UITextField?

放肆的年华 提交于 2019-11-30 09:58:31
When an Emoji character is set using the code below: self.textField.text = @"\ue415"; It just display as a square. But when I input an Emoji from the keyboard it displays correctly. What's the problem? PS: I'm using IOS 5.1 In older versions of iOS the Emoji characters were all in the Unicode Private Use Area, which as the name suggests is a set of Unicode code points that explicitly don't have any associated characters. However, the Unicode standard has been updated to include a large number of Emoji characters, so iOS now uses these ones, as does Mac OS X. You can see a list of all the

How to check if a character is supported by a font

限于喜欢 提交于 2019-11-30 09:05:11
问题 I'm working on an app with a text field. The text wrote in this field will be printed and I have an issue with some characters like emoji, chinese characters, etc... because the font do not provide these characters. It's why I want to get all the character provided by a font (The font is downloaded so I can deal directly with the file or with an UIFont object). I heard about CTFontGetGlyphsForCharacters but I'm not sure that this function do what I want and I can't get it work. Here is my

Check if there is an emoji contained in a string

你说的曾经没有我的故事 提交于 2019-11-30 08:52:46
I am getting the text size of a string with this textSize = [[tempDict valueForKeyPath:@"caption.text"] sizeWithFont:[UIFont systemFontOfSize:12] constrainedToSize:CGSizeMake(280, CGFLOAT_MAX) lineBreakMode: NSLineBreakByWordWrapping]; The only problem I have is that if the string only contains an emoji, my app crashes. Is there an easy way to check for emojis or do I have to create an array with all possible emojis and then check for them using that? error: -[NSNull sizeWithFont:constrainedToSize:lineBreakMode:]: unrecognized selector sent to instance 0x3aa88a60 if ([tempDict valueForKeyPath: