• 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
unicode console NSString NSLog unichar etc.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

unicode console NSString NSLog unichar etc.


  • Subject: unicode console NSString NSLog unichar etc.
  • From: Ben Dougall <email@hidden>
  • Date: Wed, 12 Apr 2006 12:52:16 +0100

this has got to be a seriously faq so if anyone could point me straight to an already written answer it'd be great -- i couldn't find one.

NSLog(@"%u %x %C, [string characterAtIndex: indx], [string characterAtIndex: indx], [string characterAtIndex: indx]);

the character i'm looking at for example is ‘ that is the single left quote. i've got that into my string from a text file by using initWithContentsOfFile: for NSString. the above print statement results in:

235 eb \\353

it doesn't seem to tally with any unicode tables that i can see. single left quote is 8216 and 0x2018. i know the console can't display unicode chars but what is \\353 ? it doesn't seem to correspond to anything.

i want to test for the existence of various quote marks. how can i do that?

thanks, ben.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: unicode console NSString NSLog unichar etc.
      • From: Ben Dougall <email@hidden>
  • Prev by Date: Creating Core Data Storage Types
  • Next by Date: Re: icons in tabs
  • Previous by thread: Re: Creating Core Data Storage Types
  • Next by thread: Re: unicode console NSString NSLog unichar etc.
  • Index(es):
    • Date
    • Thread