Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Fast Case Insensitive String Comparisons

Reply
Thread Tools

Fast Case Insensitive String Comparisons

 
 
Lucian Wischik
Guest
Posts: n/a
 
      12-12-2006
Jon Skeet [C# MVP] <(E-Mail Removed)> wrote:
>Mark Wilden <(E-Mail Removed)> wrote:
>> Just out of curiosity, did "mail".ToUpper() == "MAIL".ToUpper()?

>Nope


Funny!

The issue was that lowercase "i" gets capitalised to U+0130, "Latin
Capital Letter I With Dot Above".

Instead of the more normal U+0049, "Latin Capital Letter I".


I'm curious! Are there any Turks here who can explain Turkish
capitalisation?

--
Lucian
 
Reply With Quote
 
 
 
 
Mark Wilden
Guest
Posts: n/a
 
      12-13-2006
>> "Jon Skeet [C# MVP]" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed) om...
>> >
>> > Note that this test is not a culture-safe one. For instance, in Turkey,
>> > I believe (if I remember the bug I had to fix in a system a while ago
>> > that "mail".ToUpper() != "MAIL".

>>
>> Just out of curiosity, did "mail".ToUpper() == "MAIL".ToUpper()?

>
> Nope


Oh well - I guess it's nobody's business but the Turks'.

///ark


 
Reply With Quote
 
 
 
 
Jon Skeet [C# MVP]
Guest
Posts: n/a
 
      12-13-2006
Mark Wilden <(E-Mail Removed)> wrote:
> > Nope

>
> Oh well - I guess it's nobody's business but the Turks'.


Are you suggesting a history-insensitive comparison?

StringComparer.IgnoreHistory.Equals("Istanbul". "Constantinople")

Next up: a "man" comparison: Man.Triangle > Man.Particle etc?

--
Jon Skeet - <(E-Mail Removed)>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
check file exists with case sensitive on a case insensitive filesystem Xah Lee Perl Misc 4 04-05-2009 11:21 PM
string.indexof case insensitive Guoqi Zheng ASP .Net 4 01-25-2009 02:07 AM
case insensitive find on case sensitive stl map benhoefer@gmail.com C++ 1 04-06-2007 08:42 PM
Case-insensitive dict, non-destructive, fast, anyone? Ville Vainio Python 11 04-06-2005 06:53 AM
how to case select with case-insensitive string ? Tee ASP .Net 3 06-23-2004 07:40 PM



Advertisments