• 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: NSXML and invalid UTF8 characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSXML and invalid UTF8 characters


  • Subject: Re: NSXML and invalid UTF8 characters
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 28 Jan 2010 19:28:54 -0800

On Jan 28, 2010, at 4:29 PM, Keith Blount wrote:

> 			[cleanedString appendFormat:@"%C", character];

If you're worried about efficiency, format conversions like this are particularly slow; so is building up an NSString a character at a time. It's more efficient to allocate a unichar[] buffer with sufficient capacity, put characters in it, and then create an NSString in one operation.

It's probably not a big deal, though, unless you're running this on extremely long strings or on huge numbers of them.

—Jens_______________________________________________

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

References: 
 >Re: NSXML and invalid UTF8 characters (From: Keith Blount <email@hidden>)

  • Prev by Date: Re: NSXML and invalid UTF8 characters
  • Next by Date: Re: Hot to define a connection from source code?
  • Previous by thread: Re: NSXML and invalid UTF8 characters
  • Next by thread: Re: NSXML and invalid UTF8 characters
  • Index(es):
    • Date
    • Thread