by Michael S. Kaplan, published on 2004/12/11 09:51 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2004/12/11/279942.aspx
The LCMapString API is the ultimate Win32 API that does casing. All of those functions in USER32 (CharUpper, CharLower, CharUpperBuff, and CharLowerBuff) are wrappers around calls to LCMapString with the LCMAP_UPPERCASE and LCMAP_LOWERCASE flags. All of these functions do the simple mappings like a --> A --> a, å --> Å --> å, etc.
For the most part, these mappings will properly roundtrip, which is a good thing since the mapping from lowercase to uppercase is used by the file system for its case insensitivity. All of these operations are linguistically sensible.
So what does LCMAP_LINGUISTIC_CASING mean? What happens when you pass that flag?
Well, two things:
Now neither of these seems very "linguistic" to me. But they do fit into the Unicode Standard definitions of simple case mapping. Since both are described in Unicode, we should maybe have called it LCMAP_UNICODE_SIMPLE_CASING instead?
It is only the simple Unicode casing that is covered. No Microsoft products currently handle full Unicode casing, which can actually change the size of the target string.
Though we have our eye on this feature since it has been requested from time to time. Perhaps it would be higher on our list of things to do if more people were asking....
2008/11/01 What's the shape of the sort?
2005/10/18 How best to alter case
2005/06/24 LCMapString's *other* job
2005/05/26 The last word on the FINAL SIGMA
2005/03/04 And yet another blogger to keep an eye on!
go to newer or older post, or back to index or month or day