• 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 String Representations at Runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting String Representations at Runtime


  • Subject: Re: Converting String Representations at Runtime
  • From: John Joyce <email@hidden>
  • Date: Sat, 18 Apr 2009 15:44:19 -0500


Is there an easy way to take input (user or file based) at runtime
and convert unicode strings such as \u8D64 (UTF8 character) or a
whole series of these to the human-readable characters they represent?
I imagine I should be using NSScanner, but is there not some simple
function or method to lookup and return the character as it should
be represented?
Happy to RTFM, just need a pointer to the docs I should be looking at.

Does CFStringTransform do what you want?

http://www.cocoabuilder.com/archive/message/cocoa/2007/11/6/192402


Adam, Thanks!!
Sorry for the late reply, haven't been able to address this since last week.


CFStringTransform does exactly what I wanted to do.
It even pretty gracefully handles the whole string supplied.
(no idea to how far mileage would vary with this based on supplied string size or content... maybe somebody from apple can comment on that)
Oddly enough, that archived thread mentions supplying a constant that is not in the documentation as best as I could tell...
perhaps the CF docs dong get as much attention as they should?
I can certainly file a bug if appropriate...


The only catch was I finally had to sit down and look at how to handle toll-free bridging. But thankfully that was not too bad. Mostly a matter of typecasting really.

Thanks a million!
_______________________________________________

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


  • Follow-Ups:
    • Re: Converting String Representations at Runtime
      • From: Michael Ash <email@hidden>
  • Prev by Date: how to get the windows ‘s coordinate
  • Next by Date: Re: NSSavePanel and file formats
  • Previous by thread: Re: Converting String Representations at Runtime
  • Next by thread: Re: Converting String Representations at Runtime
  • Index(es):
    • Date
    • Thread