"Trying a case the second time is like eating yesterday morning’s oatmeal." -- Lloyd Paul Stryker

Of course when Stryker said this, he was referring to legal jurisprudence. But believe it or not, the quote can be just as applicable to alphabetical casing operations!

For reasons that surpass my understanding, there are many developers who run code that uppercases a lowercasing operation or vice versa as a way of making sure that any one-way mappings are taken out of the equation. They usually do this to try to match the NTFS filesystem, which does not seem to them to have any problems with one-way mappings. Which is just a little bit dumb, since the filesystem works by simple uppercasing. Because of that, the only true one-way mappings that cause these developers to have different behavior in their code are the lowercasing ones.

The problem is most acute in one particular situation (one that seems to come up frequently when people combine the above incorrect technique with extensive test passes). Basically, the issue is that Georgian has spent many years in the Unicode Standard with two scripts encoded, despite the fact that there are three scripts existing. As of Unicode 4.1, the plan is to finally add that third script and provide a two-way case mapping between the two older scripts (the uppercase Khutsuri and the new lowercase Nushkuri), leaving the modern (Mkhedruli) script completely caseless.

Now Mkhedruli has always been caseless according to Unicode so they are fine. We at Microsoft are not so fortunate, because ever since Windows 2000, Microsoft has had a one-way mapping from uppercase Khutsuri to Mkhedruli, but no converse mapping from the caseless Mkhedruli to Khutsuri. No worries for NTFS (which only uppercases), but for those developers who run through two casing operations will get incorrect results back.

(Obviously, removing the bogus mapping some time between now and when we have to do the new mapping for Unicode 4.1 would be a good thing, for both Windows and the .NET Framework. More on that when I know more....)

The moral of the story? If you want to mimic the filesystem, then skip the step that the filesystem skips -- no lowercasing!

Future "casing" columns will talk about other fun and un-fun casing factoids, issues, problems, and features in Windows and the .NET Framework.