From: Jarkko Hietaniemi Date: Wed, 28 Jun 2000 15:40:22 +0000 (+0000) Subject: tweaks from Simon Cozens to further fix tr/// under utf8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=840fae749c0f73a5c45e749c3ffa2b8a76b2cb14;p=p5sagit%2Fp5-mst-13.2.git tweaks from Simon Cozens to further fix tr/// under utf8 p4raw-id: //depot/cfgperl@6256 --- diff --git a/doop.c b/doop.c index a7634c4..7dc5a2b 100644 --- a/doop.c +++ b/doop.c @@ -469,7 +469,6 @@ Perl_do_trans(pTHX_ SV *sv) I32 hasutf = (PL_op->op_private & (OPpTRANS_FROM_UTF|OPpTRANS_TO_UTF)); - PL_op->op_private &= ~hasutf; if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL)) Perl_croak(aTHX_ PL_no_modify); @@ -483,7 +482,7 @@ Perl_do_trans(pTHX_ SV *sv) DEBUG_t( Perl_deb(aTHX_ "2.TBL\n")); - switch (PL_op->op_private & 63) { + switch (PL_op->op_private & ~hasutf & 63) { case 0: if (hasutf) return do_trans_simple_utf8(sv);