• 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: Representation of strings with special chars
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Representation of strings with special chars


  • Subject: Re: Representation of strings with special chars
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 24 Aug 2011 15:53:34 -0700

On Aug 24, 2011, at 3:45 PM, Greg Parker wrote:

> That's because you are still using [s length] to get the length of [s UTF8String]. Don't do that. If you add more umlauts then it will stop working again.

Ow. I didn’t see that problem in the code. Definitely a showstopper.

Alexander, what you probably want to do is call [s dataUsingEncoding:NSUTF8StringEncoding], then pass data.bytes and data.length into the MySQL API. (Or you could instead call strlen on the result of -UTF8String, but it’s more overhead.)

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: 
 >Representation of strings with special chars (From: Alexander Reichstadt <email@hidden>)
 >Re: Representation of strings with special chars (From: Sean McBride <email@hidden>)
 >Re: Representation of strings with special chars (From: Alexander Reichstadt <email@hidden>)
 >Re: Representation of strings with special chars (From: Alexander Reichstadt <email@hidden>)
 >Re: Representation of strings with special chars (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: Representation of strings with special chars
  • Next by Date: Re: Odd error logged when coming back from 'Browse All Versions'
  • Previous by thread: Re: Representation of strings with special chars
  • Next by thread: Re: Animated Split View
  • Index(es):
    • Date
    • Thread