U8 *l, *c, *olds = NULL;
STRLEN targlen;
s = (U8*)SvPV(right,len);
+ right_utf |= DO_UTF8(right);
if (TARG == right) {
/* Take a copy since we're about to overwrite TARG */
- olds = s = (U8*)savepvn((char*)s, len);
+ olds = s = (U8*)savepvn((char*)s, len);
}
if (!SvOK(left) && SvTYPE(left) <= SVt_PVMG)
sv_setpv(left, ""); /* Suppress warning. */
l = (U8*)SvPV(left, targlen);
+ left_utf |= DO_UTF8(left);
if (TARG != left)
sv_setpvn(TARG, (char*)l, targlen);
if (!left_utf)
}
}
-print "1..72\n";
+print "1..75\n";
my $test = 1;
$latin =~ s!(s)tr(?:aß|s+e)!$1tr.!; # \303\237 after the a
}
}
+
+{
+ $_ = $dx = "\x{10f2}";
+ s/($dx)/$dx$1/;
+ {
+ use bytes;
+ print "not " unless $_ eq "$dx$dx";
+ print "ok $test\n";
+ $test++;
+ }
+
+ $_ = $dx = "\x{10f2}";
+ s/($dx)/$1$dx/;
+ {
+ use bytes;
+ print "not " unless $_ eq "$dx$dx";
+ print "ok $test\n";
+ $test++;
+ }
+
+ $dx = "\x{10f2}";
+ $_ = "\x{10f2}\x{10f2}";
+ s/($dx)($dx)/$1$2/;
+ {
+ use bytes;
+ print "not " unless $_ eq "$dx$dx";
+ print "ok $test\n";
+ $test++;
+ }
+}