Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to prevent iOS from converting ascii into emoji?

I have this simple String applied to a UILabel

labelInfo.text = "(11) ♥ 6"

this is how I need it to look like

(11) ♥ 6

this is how it looks like instead

unwanted

I really searched alot, and didn't find a way to do this..

I found ways to remove emojis, but this makes it look like this

(11) 6

if you have a hint, it will be very appreciated.

like image 668
DeyaEldeen Avatar asked Jun 19 '16 11:06

DeyaEldeen


People also ask

How do you make emoticons not turned into Emojis?

On the Text & Images page, find the Automatically convert emoticons in your messages to emoji setting and toggle it to off. Now you should be able to send emoticons on Discord without having them automatically convert to emojis.

How do you stop emoticons from turning into Emojis on Mac?

You can use “Change Input Source,” or you can switch to the “Start Dictation” option. Choose the “Do Nothing” option to disable the Emoji keyboard. And that's it.


1 Answers

Apple has changed this in iOS 5. In most fonts, all characters that can be potentially displayed as an emoji are replaced with the colorful character from the Apple Emoji Font.

There are several solutions:

  1. Use the Unicode variant selector for non-coloured glyph: U+FE0E

labelInfo.text = "(11) \u{2665}\u{fe0e} 6"

  1. Set a font where Apple doesn't force emojis. People usually recommend Hiragino Mincho ProN.

  2. Use the graphics contexts drawing method to display the text.

Also see:

  • Unicode characters being drawn differently in iOS5
  • Prevent Emoji Characters from Showing
  • iOS 5 upgrade changed font appearance
like image 142
Codo Avatar answered Sep 30 '22 09:09

Codo