Re: Representation of strings with special chars
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