summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--op.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/op.c b/op.c
index 50db696c82..5d00c697ed 100644
--- a/op.c
+++ b/op.c
@@ -6778,6 +6778,8 @@ Perl_peep(pTHX_ register OP *o)
if ((!SvFAKE(sv = *svp) || !SvREADONLY(sv)) && !IS_PADCONST(sv)) {
key = SvPV(sv, keylen);
lexname = newSVpvn_share(key, keylen, 0);
+ if (SvUTF8(sv))
+ SvUTF8_on(lexname);
SvREFCNT_dec(sv);
*svp = lexname;
}