A new take on the diacritical marks in Romanian (written in Romanian) : Bătăi de cîmpi: De ce scriu cu î și nu cu â?
Linguistics, history and common sense aside, the programming solution of string diacritic insensitive folding when performing searches no longer works as "â" is folded to "a" and "î" is folded to "i"; "a" is not equal to "i".
I for one do not agree with not using â simply because it's already been (widely) adopted - as Google puts it:
The damage is done, the two versions are hard to support side by side (see diacritical folding reason), politics sucks, be a man and admit it - â has won.
PS Diacritical folding failure test case below:
Linguistics, history and common sense aside, the programming solution of string diacritic insensitive folding when performing searches no longer works as "â" is folded to "a" and "î" is folded to "i"; "a" is not equal to "i".
I for one do not agree with not using â simply because it's already been (widely) adopted - as Google puts it:
Results 1 - 10 of about 9,910,000 for brânză
Results 1 - 10 of about 163,000 for brînză
The damage is done, the two versions are hard to support side by side (see diacritical folding reason), politics sucks, be a man and admit it - â has won.
PS Diacritical folding failure test case below:
#include <Cocoa/Cocoa.h>
int main()
{
NSAutoreleasePool * pool = [NSAutoreleasePool new];
NSString * str1 = [NSString stringWithString:@"brinza"];
NSString * str2 = [NSString stringWithString:@"brînză"];
int res = [str1 compare:str2 options:NSDiacriticInsensitiveSearch];
NSLog(@"The strings %@, %@ are %@equal", str1, str2, res == NSOrderedSame ? @"" : @"not ");
NSString * str3 = [NSString stringWithString:@"brânză"];
res = [str1 compare:str3 options:NSDiacriticInsensitiveSearch];
NSLog(@"The strings %@, %@ are %@equal", str1, str3, res == NSOrderedSame ? @"" : @"not ");
[pool release];
}
cristi:tmp diciu$ ./a.out
2009-01-19 21:40:45.935 a.out[6734:10b] The strings brinza, brînză are equal
2009-01-19 21:40:45.965 a.out[6734:10b] The strings brinza, brânză are not equal