Re: converting unicode text representation to unichar
Re: converting unicode text representation to unichar
- Subject: Re: converting unicode text representation to unichar
- From: Greg Guerin <email@hidden>
- Date: Tue, 11 Aug 2009 10:54:18 -0700
Daniel Child wrote:
NSString *strc = [NSString stringWithFormat: @"%c", &value];
...
NSString *strC = [NSString stringWithFormat: @"%C", &value];
These are both wrong. Remove the & before value.
http://developer.apple.com/documentation/Cocoa/Conceptual/Strings/
Articles/formatSpecifiers.html
Also, %c is wrong because value is not an 8-bit ASCII character, and
printing its low 8 bits as if it were ASCII is meaningless.
-- GG
_______________________________________________
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