summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/doop.c b/doop.c
index 3c34425075..762c67974a 100644
--- a/doop.c
+++ b/doop.c
@@ -1177,8 +1177,11 @@ Perl_do_kv(pTHX)
PUTBACK; /* hv_iternext and hv_iterval might clobber stack_sp */
while ((entry = hv_iternext(keys))) {
SPAGAIN;
- if (dokeys)
+ if (dokeys) {
XPUSHs(hv_iterkeysv(entry)); /* won't clobber stack_sp */
+ if (SvUTF8((SV*)keys))
+ SvUTF8_on(TOPs); /* Yuck */
+ }
if (dovalues) {
PUTBACK;
tmpstr = realhv ?