RE: locale-aware string comparisons

From: Shawn Steele <Shawn.Steele_at_microsoft.com>
Date: Wed, 2 Jan 2013 19:07:07 +0000

I'd try to avoid making a dependency where case mapping needs to be the same as case insensitive comparisons.

I'd either always case fold then compare, or always compare case insensitive.

-Shawn

-----Original Message-----
From: unicode-bounce_at_unicode.org [mailto:unicode-bounce_at_unicode.org] On Behalf Of James Cloos
Sent: Tuesday, January 1, 2013 5:43 PM
To: Mark Davis ☕
Cc: Whistler, Ken; unicode_at_unicode.org
Subject: Re: locale-aware string comparisons

>>>>> "MD" == Mark Davis ☕ <mark_at_macchiato.com> writes:

MD> All of these are different, all of them still have over 200
MD> differences from either compare(lower(x),lower(y)) or compare(upper
MD> (x),upper(y))

What about, then:

  compare(lower(x),lower(y)) || compare(upper(x),upper(y))

Or, to emphasize that I mentioned C only as a pseudocode, akin to SQL:

  LOWER(x) LIKE LOWER(y) OR UPPER(x) LIKE UPPER(y)

Would that cover all of the outliers?

-JimC

-- 
James Cloos <cloos_at_jhcloos.com>         OpenPGP: 1024D/ED7DAEA6
Received on Wed Jan 02 2013 - 13:14:22 CST

This archive was generated by hypermail 2.2.0 : Wed Jan 02 2013 - 13:14:23 CST