On Apr 9, 2008, at 1:25 PM, Douglas Davidson wrote:


On Apr 9, 2008, at 11:14 AM, Alexander Cohen wrote:

Sorry for the off-topic post but this is the best place to get info ( lots of smart people ).

I have a string that is composed unicode characters. I want to be able to transform that string into all ascii characters by transforming all non-ascii characters into their ascii equivalent.

ex:

ü = u
é = e

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.

___________________________________________________________
Ricky A. Sharp         mailto:[EMAIL PROTECTED]
Instant Interactive(tm)   http://www.instantinteractive.com

_______________________________________________

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