• 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: converting unicode text representation to unichar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Possible to work around 10.4 LaunchAgent bugs?
  • Next by Date: Undo's setActionName: and Core Data
  • Previous by thread: Re: converting unicode text representation to unichar
  • Next by thread: Re: NSUserDefault and Negative numerical arguments (Was: Posting mouse clicks with multiple displays)
  • Index(es):
    • Date
    • Thread