On Tue, Apr 12, 2005 at 10:46:50PM -0500, Andy Lester wrote: > @@ -159,7 +158,8 @@ > } > > if (TARG != left) { > - lpv = SvPV(left, llen); /* mg_get(left) may happen here */ > + STRLEN llen; > + const char* const lpv = SvPV(left, llen); /* mg_get(left) may > happen here */ > lbyte = !DO_UTF8(left); > sv_setpvn(TARG, lpv, llen); > if (!lbyte) > @@ -172,7 +172,6 @@ > mg_get(left); /* or mg_get(left) may happen here */ > if (!SvOK(TARG)) > sv_setpv(left, ""); > - lpv = SvPV_nomg(left, llen); > lbyte = !DO_UTF8(left); > if (IN_BYTES) > SvUTF8_off(TARG);
That SvPV_nomg may be needed to set the UTF8 flag.