1

I am using unicode symbol for BOLD up & down arrow from this link http://en.wikipedia.org/wiki/Miscellaneous_Symbols_and_Arrows

But its showing blue box around the arrow as shown in below screenshot

enter image description here

My code is as below

NSString *strMore = @"\u2B06" ;
NSString *strLess = @"\u2B07" ;

self.lblMore.text = strMore;
self.lblLess.text = strLess;

Can anybody tell me what is going wrong ?

iOSAppDev
  • 2,755
  • 4
  • 39
  • 77

1 Answers1

4

The arrow with the blue box around it, is the Emoji arrow with the same Unicode. Open Character Viewer on OS X (Control + Option + Space) to look up the codes and check the Unicode for the Arrows section from the left pane. Using that unicode should fix the issue as it won't mess with the Emoji arrow codes!

Update Sorry, I don't have access to a Mac at the moment, therefore I couldn't look up the code myself. Apparently if you add \U0000FE0E to your unicode, that'll avoid the Emoji. So in your case:

Instead of:

NSString *strMore = @"\u2B06" ; //This will map the character to the Emoji icon; the blue up arrow.
NSString *strLess = @"\u2B07" ; //This will map the character to the Emoji icon; the blue down arrow.

Write:

NSString *strMore = @"\u2B06\U0000FE0E" ; //This will disable Emoji character mapping and will display the proper unicode character, the black up arrow here.
NSString *strLess = @"\u2B07\U0000FE0E" ; //This will disable Emoji character mapping and will display the proper unicode character, the black down arrow here.

Let me know if that works!

Second Update:

Glad it worked! Didn't want to reference before making sure it works. Apparently this is mentioned in Apple's Developer forum for the paid developers. It's also mentioned in this link and this question.

Community
  • 1
  • 1
Neeku
  • 3,646
  • 8
  • 33
  • 43
  • Thanks for the screenshot. But in Character Viewer as well its showing the same symbol that I am using currently. – iOSAppDev Jun 12 '14 at 11:40
  • Sorry, I'm on a shi**y Windows machine at the moment, that's why I couldn't check it myself. Check out the updated answer. – Neeku Jun 12 '14 at 11:49
  • Thanks Neeku for updated answer. This works perfectly :) Thanks a ton. Just for curiosity , you told me `if you add \U0000FE0E to your unicode, that'll avoid the Emoji.` - where did you find this ? Can you please share the link as I need to learn :) – iOSAppDev Jun 12 '14 at 11:55
  • Sure! There you go with another update to the answer! – Neeku Jun 12 '14 at 12:07
  • Thank you Neeku for reference links :) – iOSAppDev Jun 12 '14 at 12:17
  • 1
    Not sure why the wide-Unicode-escape `\U` is being used for all these examples, this Variation Selector is a BMP character that should be accessible simply as `\uFE0E`. – bobince Jun 12 '14 at 20:18
  • @bobince Hmm... I tried your suggestion, but [an error](http://i.stack.imgur.com/0kBMj.png) occurs in that case. – Neeku Jul 14 '14 at 09:31
  • OMG @bobince! Hadn't noticed that! Thanks. (: – Neeku Jul 15 '14 at 11:42