Re: unicode warning in ObjC
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