• 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: ARC question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARC question


  • Subject: Re: ARC question
  • From: Vincent Habchi <email@hidden>
  • Date: Mon, 29 Oct 2012 14:55:04 +0100

Le 29 oct. 2012 à 14:34, Mike Abdullah <email@hidden> a écrit :

> Well, you can ask CFXMLCreateStringByUnescapingEntities() to do this on OS X, although if I recall all the CFXML functions have now sadly been deprecated. The source code for it should still be available if you search around.

I wasn’t aware of those calls. They do not seem to be deprecated. However, I have also a lot of accented characters (é, à, û, etc.) to unescape (since the contents are in French), and CFXMLCreateStringByUnescapingEntities() provides a basic dictionary of only five elements; it is extensible, but of course at the expense of creating a custom dictionary, which, added to the necessary conversions between CFStringRef and NSString and vice-versa, would hamper the legibility of the code somewhat.

> But in general, I would just work my way through the string looking for occurrences of '&' and see if that makes up a valid escape sequence. Much of the problem if dealing with HTML rather than XML is that there are a vast range of special sequences. e.g. &micro;

Yeah, that’s what I thought of. I will add a note in the body of the article about this.

Thanks for all!
Vincent


_______________________________________________

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: ARC question
      • From: Mike Abdullah <email@hidden>
    • Re: ARC question
      • From: Kyle Sluder <email@hidden>
References: 
 >ARC question (From: Vincent Habchi <email@hidden>)
 >Re: ARC question (From: Mike Abdullah <email@hidden>)
 >Re: ARC question (From: Vincent Habchi <email@hidden>)
 >Re: ARC question (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: ARC question
  • Next by Date: Re: ARC question
  • Previous by thread: Re: ARC question
  • Next by thread: Re: ARC question
  • Index(es):
    • Date
    • Thread