From: Karl Williamson Date: Fri, 14 May 2010 14:56:46 +0000 (-0600) Subject: PATCH: user defined special casing for non utf8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a6f87d8c282ba94b0308898be052d1ac956d0ea9;p=p5sagit%2Fp5-mst-13.2.git PATCH: user defined special casing for non utf8 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. --- diff --git a/t/op/lc_user.t b/t/op/lc_user.t index 276e2f2..664cc6c 100644 --- a/t/op/lc_user.t +++ b/t/op/lc_user.t @@ -4,7 +4,11 @@ BEGIN { require './test.pl'; } -plan tests => 4; +plan tests => 5; + +%utf8::ToSpecUpper = ( +"s" => "SS", # Make sure can handle weird ASCII translations +); sub ToUpper { return < 0xFF)) { + if (special) { /* It might be "special" (sometimes, but not always, * a multicharacter mapping) */ HV * const hv = get_hv(special, 0);