Message-Id: <
20040321151828.DAC6.BQW10602@nifty.com>
p4raw-id: //depot/perl@22545
#
#
-plan tests => 144;
+plan tests => 145;
{
# bug id 20001009.001
like($@, qr/^Modification of a read-only value attempted/,
"utf8::encode should refuse to touch read-only values");
}
+
+{
+ my $a =3D "456\xb6";
+ utf8::upgrade($a);
+
+ my $b =3D "123456\xb6";
+ $b =3D~ s/^...//;
+ utf8::upgrade($b);
+ is($b, $a, "utf8::upgrade OffsetOK");
+}
}
if (hibit) {
STRLEN len;
-
+ SvOOK_off(sv);
+ s = (U8*)SvPVX(sv);
len = SvCUR(sv) + 1; /* Plus the \0 */
SvPVX(sv) = (char*)bytes_to_utf8((U8*)s, &len);
SvCUR(sv) = len - 1;