On Dec 10, 2010, at 9:38 PM, WT wrote: > thank you both for the very fast response.
You're welcome. > Is that behavior of NSScanner documented anywhere? I read the docs but don't > remember coming across it. I'm a bit stunned. What's the point of having a > scanner if it ignores certain key aspects of the locale? It's not ignoring the locale. There are just different ways of formatting numbers, and NSScanner just wasn't designed to understand some of them. Group separators are more relevant to human-readable numbers than computer-readable ones. I would venture to say that NSScanner is an object-oriented analog to the scanf family of functions from the standard C library. Those do not understand group separators, either. It's pretty much the norm for number-scanning library routines. It's also the norm for library routines to not include group separators when formatting numbers for output. (e.g. -[NSNumber stringValue]) Regards, Ken _______________________________________________ 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