p4raw-id: //depot/perl@6085
SP -= items;
}
else { /* Note: mark already snarfed by pp_list */
- SV *tmpstr;
+ SV *tmpstr = POPs;
STRLEN len;
+ bool isutf = SvUTF8(tmpstr) ? TRUE : FALSE;
- tmpstr = POPs;
SvSetSV(TARG, tmpstr);
SvPV_force(TARG, len);
if (count != 1) {
}
*SvEND(TARG) = '\0';
}
- (void)SvPOK_only(TARG);
+ if (isutf)
+ (void)SvPOK_only_UTF8(TARG);
+ else
+ (void)SvPOK_only(TARG);
PUSHTARG;
}
RETURN;
ok 126, length($x) eq 3;
$x = substr($x,1,1);
ok 127, $x eq "\x{263a}";
- ok 128, length($x) eq 1;
+ $x = $x x 2;
+ ok 128, length($x) eq 2;
substr($x,0,1) = "abcd";
- ok 129, $x eq "abcd";
- ok 130, length($x) eq 4;
+ ok 129, $x eq "abcd\x{263a}";
+ ok 130, length($x) eq 5;
}