Re: Case insensitive comparisons

From: Michael Kaplan (michka@trigeminal.com)
Date: Fri Mar 24 2006 - 12:13:26 CST

  • Next message: John Hudson: "Re: DIY OpenType Re-ordering"

    On Fri, 24 Mar 2006 19:40:03 +0200, Jony Rosenne wrote
    > in
    > http://msdn.microsoft.com/library/default.asp?url=/library/en-
    us/dndotnet/html/StringsinNET20.asp
    >
    > Microsoft recommends for case insensitive comparisons:
    >
    > "DO: Use ToUpperInvariant rather than ToLowerInvariant when normalizing
    > strings for comparison."
    >
    > I have seen similar recommendation elsewhere.
    >
    > However, I was under the impression that in Unicode it is better to
    > do ToLower for removing case, because of the German SS.
    >
    > Which is better? Should the UTC take a position?
    >
    > Jony

    The Microsoft recommendation is based on the very real issue involving
    identifier syntax on NT for the file system and for object names, which
    uppercases (its an upcase and binary sort of comparison world). This could
    actually cause problems on pretty much any pre-Vista platform.

    Starting in Vista, the recommendation will no longer matter as much, but
    since in the .NET Framework most people using it for development will be
    targetting other platforms too, the recommendation will be around for some
    time to come.

    The Sharp S issue is not an issue for any shipping or under development
    version of Windows since they all support only simple casing stuff -- thus no
    sharp S in casing. It is around in collation and has been since NT 3.51 (and
    maybe even NT 3.1).

    I doubt the UTC needs to "take a position" beyond what they have done. They
    give a recommendation and a reason for it; so does Microsoft. People can do
    what they want with the information based on an intelligent review of the
    reasons....



    This archive was generated by hypermail 2.1.5 : Fri Mar 24 2006 - 12:14:56 CST