This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
evalbytes should ignore outer utf8 declaration
[perl5.git] / op.c
diff --git a/op.c b/op.c
index 2fbf4bd..93a9678 100644 (file)
--- a/op.c
+++ b/op.c
@@ -7512,6 +7512,7 @@ Perl_ck_eval(pTHX_ OP *o)
        op_getmad(oldo,o,'O');
     }
     o->op_targ = (PADOFFSET)PL_hints;
+    if (o->op_private & OPpEVAL_BYTES) o->op_targ &= ~HINT_UTF8;
     if ((PL_hints & HINT_LOCALIZE_HH) != 0
      && !(o->op_private & OPpEVAL_COPHH) && GvHV(PL_hintgv)) {
        /* Store a copy of %^H that pp_entereval can pick up. */