On 16 Apr 2008, at 16:43, Alexander Cohen wrote:
I have an NSString that contains this Unicode character: '\u00e9'. I have another app that represents the same character as 'e\u0301'. Is there any way to transform one to the other so that isEqualToString returns YES?
Yes. You want to look at the string normalization methods (e.g. - decomposedStringWithCanonicalMapping).
Which one you want to use before your comparison depends on exactly what you are trying to achieve; e.g. you might want to use the compatibility mapping rather than the canonical mapping instead (which will map superscripts and subscripts, font variants, circled characters etcetera to related but not entirely equivalent forms).
The book "Unicode Demystified" is quite useful if you get particularly involved with this kind of thing (as is the Unicode book itself).
Kind regards, Alastair. -- http://alastairs-place.net _______________________________________________ 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]
