On Apr 9, 2008, at 1:10 PM, Ricky Sharp wrote:

Anyone know of a way to do that or do i need a lookup table with all characters and their equivalents?

Take a look at CFStringTransform(). The details will depend on exactly what you want to do.


And of course, this process will only work on a subset of all the Latin-based languages.

Are you using this to build "sort keys"? If so, you should probably just use the various compare APIs available. Those would also ensure that the rules honor what the user has set up in their International prefs.

Yes, that is worth noting. There are also CFStringFold() and CFStringNormalize() to be considered; exactly what is appropriate depends on the details of what is wanted. There certainly are cases where there are good reasons to want to (for example) remove diacritics from a given string, but in other cases there are better alternatives. We might be able to give better advice with a broader description of the problem.

Douglas Davidson

_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [EMAIL PROTECTED]

Reply via email to