Users can define their own case changing mappings to replace the
standard ones. Prior to this patch, any mappings on characters whose
ordinals are 0-222, 224-255 that resulted in multiple characters were
ignored.
Note that there still is a deficiency in that the mappings will be
applied only to strings in utf8 format.
require './test.pl';
}
-plan tests => 4;
+plan tests => 5;
+
+%utf8::ToSpecUpper = (
+"s" => "SS", # Make sure can handle weird ASCII translations
+);
sub ToUpper {
return <<END;
is("\Ufoo\x{101}", "foo\x{101}", "no changes on 'foo'");
is("\Ubar\x{101}", "BAr\x{101}", "changing 'ab' on 'bar' ");
+my $s = 's';
+utf8::upgrade $s;
+is(uc($s), "SS", "Verify uc('s') is 'SS' with our weird xlation, and utf8");
sub ToLower {
return <<END;
}
}*/
- /* The 0xDF is the only special casing Unicode code point below 0x100. */
- if (special && (uv1 == 0xDF || uv1 > 0xFF)) {
+ if (special) {
/* It might be "special" (sometimes, but not always,
* a multicharacter mapping) */
HV * const hv = get_hv(special, 0);