Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Folding Case?

Posted: 06/26/09 04:55:13

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 "ΜΆΪΟΣ" 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 "Σ" capital sigma lowercases to U+03C3 "σ" 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.

There are no responses to display.