+# The lib/uni/fold.t should give the fourth folding, "casefolding", a good
+# workout (one cannot directly get that from Perl).
+# \x{01C4} is LATIN CAPITAL LETTER DZ WITH CARON
+# \x{01C5} is LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON
+# \x{01C6} is LATIN SMALL LETTER DZ WITH CARON
+# \x{03A3} is GREEK CAPITAL LETTER SIGMA
+# \x{03C2} is GREEK SMALL LETTER FINAL SIGMA
+# \x{03C3} is GREEK SMALL LETTER SIGMA
+
+is(lc("\x{1C4}") , "\x{1C6}", "U+01C4 lc is U+01C6");
+is(lc("\x{1C5}") , "\x{1C6}", "U+01C5 lc is U+01C6, too");
+
+is(ucfirst("\x{3C2}") , "\x{3A3}", "U+03C2 ucfirst is U+03A3");
+is(ucfirst("\x{3C3}") , "\x{3A3}", "U+03C3 ucfirst is U+03A3, too");
+
+is(uc("\x{1C5}") , "\x{1C4}", "U+01C5 uc is U+01C4");
+is(uc("\x{1C6}") , "\x{1C4}", "U+01C6 uc is U+01C4, too");
+
+# #18107: A host of bugs involving [ul]c{,first}. AMS 20021106
+$a = "\x{3c3}foo.bar"; # \x{3c3} == GREEK SMALL LETTER SIGMA.
+$b = "\x{3a3}FOO.BAR"; # \x{3a3} == GREEK CAPITAL LETTER SIGMA.
+
+($c = $b) =~ s/(\w+)/lc($1)/ge;
+is($c , $a, "Using s///e to change case.");
+
+($c = $a) =~ s/(\w+)/uc($1)/ge;
+is($c , $b, "Using s///e to change case.");
+
+($c = $b) =~ s/(\w+)/lcfirst($1)/ge;
+is($c , "\x{3c3}FOO.bAR", "Using s///e to change case.");
+
+($c = $a) =~ s/(\w+)/ucfirst($1)/ge;
+is($c , "\x{3a3}foo.Bar", "Using s///e to change case.");
+
+# #18931: perl5.8.0 bug in \U..\E processing
+# Test case from Nicholas Clark.
+for my $a (0,1) {
+ $_ = 'abcdefgh';
+ $_ .= chr 256;
+ chop;
+ /(.*)/;
+ is(uc($1), "ABCDEFGH", "[perl #18931]");
+}