Another Q about Unicode, Folding Greek edition!

Nick Sabalausky a at a.a
Tue Jun 8 18:43:19 PDT 2010


Thanks all for the helpful responses. Since we seem to have some real 
Unicode-knowledge people here, I'd like to repost a question I had asked 
elsewhere awhile back, but didn't get an answer:

--------------------------------------------------------------------------------
Can someone explain how folding-case differs from lower-case and why it 
should be used for case-insensitive matching instead of lower-case?

I was looking at this document, but still don't get it: 
http://www.unicode.org/reports/tr21/tr21-5.html

The only part I see that directly addresses that is this:

      Case-folding is more than just conversion to lowercase.
      For example, it handles cases such as the Greek sigma,
      so that "?????" and "????S" will match correctly.

Which references what it says earlier about sigma:

      Characters may also have different case mappings,
      depending on the context.

      For example, U+03A3 "S" capital sigma lowercases to
      U+03C3 "s" small sigma if it is followed by another
      letter, but lowercases to U+03C2 "?" small
      final sigma if it is not.

But I still don't see how that demonstrates a need for anything other than 
toLower provided that the given toLower routine is already properly handling 
the "end of word"/"not end of word" difference.
--------------------------------------------------------------------------------

Unless, it's just extra speed due to not having to handle things like the 
"end of word"/"not end of word" difference?

BTW, if those characters don't show up right on the newsgroup, the original 
quesion (where they are showing up right, at least for me) is here: 
http://www.dsource.org/projects/tango/forums/topic/782




More information about the Digitalmars-d mailing list