• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: unicode warning in ObjC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unicode warning in ObjC


  • Subject: Re: unicode warning in ObjC
  • From: Martin Wierschin <email@hidden>
  • Date: Tue, 11 Sep 2007 02:23:24 -0700

unichar character = [[NSString stringWithUTF8String: "\u03C0"] characterAtIndex: 0];

NSString has no problem with storing/representing the character, it's the compiler that doesn't like your C string literal. This is what you want:


unichar character = [[NSString stringWithFormat:@"%C", 0x03C0] characterAtIndex:0];

But really, why go through NSString if you already know the constant? Eg:

	unichar character = 0x03C0;

~Martin


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >unicode warning in ObjC (From: Hans van der Meer <email@hidden>)

  • Prev by Date: unicode warning in ObjC
  • Next by Date: Custom ColorPicker loading from bundle
  • Previous by thread: unicode warning in ObjC
  • Next by thread: Custom ColorPicker loading from bundle
  • Index(es):
    • Date
    • Thread