emoji

How to match a URL containing emojis using a regex?

╄→尐↘猪︶ㄣ 提交于 2019-12-19 05:06:47
问题 How can I write a regular expression to match URLs that contain emojis? The regex should match ordinary alphanumeric URLs along with URLs containing emojis in the domain name, path and/or parameters such as: http://🏹.to http://www.🏹.to/🚀🌖 http://🏹.to/I❤️coding?ref=🏹 Most web applications today (including, but not limited to, social networks, online communities, etc.) detect automatically URLs posted by the users as text and convert them into hyperlinks. Nonetheless, almost none of them

special characters (emoticons) in text file

吃可爱长大的小学妹 提交于 2019-12-18 14:36:16
问题 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

special characters (emoticons) in text file

别等时光非礼了梦想. 提交于 2019-12-18 14:33:34
问题 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

Creating softkeyboard with custom emoji

最后都变了- 提交于 2019-12-18 13:38:25
问题 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

How to show Emoji in UILabel iOS

纵然是瞬间 提交于 2019-12-18 11:26:10
问题 I have to show the textview text smily in UILabel. In the UILabel - lbl.text = @"Happy to help you \U0001F431; its showing properly. In UITextView - I tried to convert UITextView text in string and then log is - %F0%9F%99%88%F0%9F%99%89%F0%9F%99%8A How to encode which i can show in UILabel , anybody please suggest me. 回答1: NSString *str = @"Happy to help you \U0001F431"; NSData *data = [str dataUsingEncoding:NSNonLossyASCIIStringEncoding]; NSString *valueUnicode = [[NSString alloc]

How to detect when user changes keyboards?

拟墨画扇 提交于 2019-12-18 10:32:27
问题 Is there some way to detect when the user changes keyboard types, specifically to the Emoji keyboard in this case? 回答1: 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 =

NSJSONSerialization and Emoji

心已入冬 提交于 2019-12-18 06:58:30
问题 I'm currently trying to POST some JSON containing emojis to a python API. I tried feeding the NSJSONSerialization directly with the string containing the emojis from my UITextField but the serializer crashed with no meaningful explanation. Afterwards I tried to do some format conversion and ended up with something like this: NSString *uniText = mytextField.text; NSData *msgData = [uniText dataUsingEncoding:NSNonLossyASCIIStringEncoding]; NSString *goodMsg = [[NSString alloc] initWithData

Does IOS support all Unicode emojies?

為{幸葍}努か 提交于 2019-12-18 05:07:59
问题 Hello All, I have a problem regarding Unicode characters . I'm able to append Apple Art Work Unicode Characters in UITextView . Like this : - self.textView.text = @"\ue00A"; It is Okay. But now i have many Unicodes Characters which're not in Apple art work. One of them is U+1F3C7 Now I'm trying to show it in UITextView . self.textView.text = @"\u1f3c7"; Then it is showing me an Special Character instead of Emoji. This is the Emoji Icon of this Unicode But it is showing me Ἴ7 . Apple doesn't

UIKeyboardWillChangeFrame Notification not called with emoji keyboard

旧城冷巷雨未停 提交于 2019-12-18 04:19:10
问题 First I had a UIViewController listenning for the UIKeyboardWillShow notification to adjust the screen for the keyboard. But every time I changed to emoji keyboard, the notification wasn't called. So, I changed to UIKeyboardWillChangeFrame notification like this NotificationCenter.default.addObserver(self, selector: #selector(self.keyboardChanged(notification:)), name: NSNotification.Name.UIKeyboardWillShow, object: nil) It seems to work fine if I just change to emoji by tapping keyboard type

Truncate string containing emoji or unicode characters at word or character boundaries

狂风中的少年 提交于 2019-12-18 04:05:25
问题 How can I truncate a string at a given length without annihilating a unicode character that might be smack in the middle of my length? How can one determine the index of the beginning of a unicode character in a string so that I can avoid creating ugly strings. The square with half of an A visible is the location of another emoji character which has been truncated. -(NSMutableAttributedString*)constructStatusAttributedStringWithRange:(CFRange)range NSString *original = [_postDictionay