by Michael S. Kaplan, published on 2005/07/09 03:11 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2005/07/09/437071.aspx
I actually recall asking Julie Bennett this question (why doesn't FoldString take an LCID?) a few years ago, and her answer was that none of the foldings that the function did were locale-dependant.
Now that is true for some of the foldings:
Now it would be nice if MAP_FOLDDIGITS (Map all digits to Unicode characters 0 through 9) were a reversible opration. And the only way it ever could be would be to have an LCID parameter to specify what to map it to. Though as a workaround you could use the GetLocaleInfo function with the LCID you wanted to use and the LOCALE_SNATIVEDIGITS flag to map them. So this is not the end of the world.
However, that last flag, MAP_EXPAND_LIGATURES, is the tough one.
The flag as a simple job -- it expands all ligature characters so that they are represented by their two-character equivalent. Expand all ligature characters so that they are represented by their two-character equivalent. For example, the ligature 'æ' expands to the two characters 'a' and 'e'.
And this flag works by consulting the very same table that the collation functions use to find these characters that expand. Generally this will all work.
EXCEPT there are many languages (for example) where æ is considered to not be one of those characters to expand. This includes Danish, Norwegian, and Icelandic. And if FoldString took an LCID it could have at its disposal, the exact list for each circumstance might change as needed.
Unfortunately, there really is no good way to do this language-specific type of thing right now. Which means we may be expected to try and tackle the issue in some future release....
This post brought o you by "æ" (U+00e6, a.k.a. LATIN SMALL LETTER AE)
# Dean Harding on 10 Jul 2005 7:51 PM:
# Michael S. Kaplan on 10 Jul 2005 9:29 PM:
2006/06/18 The Phantom of the Digits
2006/02/22 And the digits just keep on coming
2006/01/18 Digits -- there is no substitute
2005/07/19 Sort element vs. text element
go to newer or older post, or back to index or month or day