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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to