makerofthings7
makerofthings7

Reputation: 61503

Examples of Unicode String comparisons compared to the .NET framework default

I'm looking for some examples of how and when smart people do a Unicode comparison of strings, versus the framework default.

Since many people don't work with strings from other cultures, here are a few interesting comparison examples I found.

  1. .ToUpper()
    • The lowercase Turkish 'i' converts to an uppercase İ (U+0130)
  2. Equals
    • The uppercase version of the Turkish example above
  3. Comparing equality for the last word in a sentence
    • Hebrew treats the last letter in a sentence differently then how it would be represented in Arabic
  4. ... other examples ...

Question
What comparisons are common in the Unicode world? (feel free to expand on the language examples)

What situations should I use (or not use) culture insensitive comparisons? This seems to boil down to either a "linguistic", or a "non-linguistic/(binary)" operation.

I'm particularly interested how this would affect Chinese and other eastern languages.

References
While researching this question, I came across these sites

Joel on Software: What every developer should know about Unicode

Strings In .NET

Upvotes: 1

Views: 2885

Answers (1)

James Manning
James Manning

Reputation: 13589

Best practices doc: http://msdn.microsoft.com/en-us/library/dd465121.aspx

Upvotes: 1

Related Questions