Re: Ignore accents when comparing strings
Re: Ignore accents when comparing strings
- Subject: Re: Ignore accents when comparing strings
- From: Andrew Farmer <email@hidden>
- Date: Wed, 5 Jan 2005 16:22:34 -0800
On 04 Jan 2005, at 22:52, Simon alias Trax wrote:
When I compare two NSStrings, I want the accented characters be
treated as regular characters. For example, if "é" is found in a
string, it will act like "e" and "ê" and so on. Another example :
"parle" and "parlé" will be considered the same when compared.
I'm doing this, through the method
sortUsingSelector:@selector(compare:) (I can't use anything else since
I don't know how to pass parameters within this method.
Here's a real-life example :
NSString *mot1 = @"arc";
NSString *mot2 = @"a";
NSString *mot3 = @"à";
Unless things have changed recently, GCC isn't UTF-8 aware and may be
doing strange things to your text. Try reading your strings in from a
file or from the UI and try again.Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden