p4raw-id: //depot/perl@8415
s = m;
}
}
- else if ((rx->reganch & RE_USE_INTUIT) && !rx->nparens
+ else if (do_utf8 == ((rx->reganch & ROPT_UTF8) != 0) &&
+ (rx->reganch & RE_USE_INTUIT) && !rx->nparens
&& (rx->reganch & ROPT_CHECK_ALL)
&& !(rx->reganch & ROPT_ANCH)) {
int tail = (rx->reganch & RE_INTUIT_TAIL);
#endif
restart:
- other_last = Nullch;
-
/* Find a possible match in the region s..strend by looking for
the "check" substring in the region corrected by start/end_shift. */
if (flags & REXEC_SCREAM) {
PL_reg_ganch = strbeg;
}
- if (!(flags & REXEC_CHECKED) && prog->check_substr != Nullsv) {
+ if (do_utf8 == (UTF!=0) &&
+ !(flags & REXEC_CHECKED) && prog->check_substr != Nullsv) {
re_scream_pos_data d;
d.scream_olds = &scream_olds;
}
}
-print "1..105\n";
+print "1..106\n";
my $test = 1;
print "ok $test\n";
$test++; # 105
}
+
+{
+ use utf8;
+
+ my @a = split(/\xFE/, "\xFF\xFE\xFD");
+
+ print "not " unless @a == 2 && $a[0] eq "\xFF" && $a[1] eq "\xFD";
+ print "ok $test\n";
+ $test++; # 106
+}