in reply to Re: User-Defined Case Mappings
in thread User-Defined Case Mappings

I'm also curious whether you really intended to use "0044" as the third element being returned by your "ToUpper" sub. Did you really want uc("abcdef") to return "DEFdef"?

My code snippet was just to understand how to make the user mappings work. The snippet itself is not of practical use. The choice of "044" as the third element was pretty arbitrary and just to make the difference from the default mapping stand out.

When I use Unicode strings in perl, I consider "simple Unicode case mapping" to be the same thing as "default full case mapping". But you seem to mean something else by it, so I'm confused.

Unicode case mapping is described in Unicode Standard Annex #21. Briefly - a full mapping may expand one character to multiple characters. For example, the German character U+00DF "ß" small letter sharp s expands when uppercased to the sequence of two characters "SS". Casing may also be context dependent. Simple case mapping is defined in the UnicodeData.txt file from the Unicode Charater Database. It gives a 1-1 only case mapping that is not context dependent.