Sort an array with special characters - iPhone

Posted by ncohen on Stack Overflow See other posts from Stack Overflow or by ncohen
Published on 2010-03-22T13:08:14Z Indexed on 2010/03/22 13:11 UTC
Read the original article Hit count: 279

Hi everyone, I have an array with french strings let say: "égrener" and "exact" I would like to sort it such as égrener is the first. When I do:

NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES];
NSArray *sortDescriptors = [NSArray arrayWithObject:descriptor];
NSArray *sortedArray = [myArray sortedArrayUsingDescriptors:sortDescriptors];

I get the é at the end of the list... What should I do?

Thanks

© Stack Overflow or respective owner

Related posts about iphone

Related posts about sorting