use HVhek_KEYCANONICAL in hv_delete
authorRuslan Zakirov <ruz@bestpractical.com>
Fri, 5 Oct 2012 22:30:20 +0000 (02:30 +0400)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 8 Oct 2012 15:50:13 +0000 (08:50 -0700)
hv.c

index c5e1206..0375a94 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -959,7 +959,7 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
     if (!HvARRAY(hv))
        return NULL;
 
-    if (is_utf8) {
+    if (is_utf8 && !(k_flags & HVhek_KEYCANONICAL)) {
        const char * const keysave = key;
        key = (char*)bytes_from_utf8((U8*)key, &klen, &is_utf8);