• 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: HTML-encoded characters mucking up my NSStrings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTML-encoded characters mucking up my NSStrings


  • Subject: Re: HTML-encoded characters mucking up my NSStrings
  • From: Kyle Moffett <email@hidden>
  • Date: Tue, 10 Feb 2004 19:15:23 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Feb 10, 2004, at 18:22, Dustin Voss wrote:
CFStringRef unescapedCF = CFXMLCreateStringByUnescapingEntities (NULL, (CFStringRef) htmlString, NULL);
NSString *unescaped = [NSString stringWithString: (NSString *) unescapedCF];
CFRelease (unescapedCF);

Why bother with the extra string? CFStringRef and NSString * are Toll-Free bridged

NSString *noEntities = (NSString *)CFXMLCreateStringByUnescapingEntities (NULL, (CFStringRef)withEntities, NULL);

Note, noEntities is *not* autoreleased, you need to autorelease or release it when done.

Cheers,
Kyle Moffett

- -----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/U d- s++: a17 C++++>$ UB/L/X/*++++(+)>$ P+++(++++)>$
L++++(+++) E W++(+) N+++(++) o? K? w--- O? M++ V? PS+() PE+(-) Y+
PGP+++ t+(+++) 5 X R? tv-(--) b++++(++) DI+ D+ G e->++++$ h!*()>++$ r !y?(-)
- ------END GEEK CODE BLOCK------


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFAKXRB+9lumGKBuiIRArpRAJ9o2RMMjFRQnuJ1dUHGYMsFxedmfwCbB3GQ
CtvWzisBF02Z1wdJV7cdJ24=
=ZHOz
-----END PGP SIGNATURE-----
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: HTML-encoded characters mucking up my NSStrings
      • From: Dustin Voss <email@hidden>
References: 
 >HTML-encoded characters mucking up my NSStrings (From: Tom Burns <email@hidden>)
 >Re: HTML-encoded characters mucking up my NSStrings (From: Dustin Voss <email@hidden>)

  • Prev by Date: Scrolling two NSTableView with one scrollbar
  • Next by Date: Re: Sneaky Key-Value Observing
  • Previous by thread: Re: HTML-encoded characters mucking up my NSStrings
  • Next by thread: Re: HTML-encoded characters mucking up my NSStrings
  • Index(es):
    • Date
    • Thread