bug noticed by Robin Houston; basically the code of detecting
value wraparound was acting differently under different compilers
and platforms. The workaround is to remove the overflow check
for now, a real fix would be to do the overflow (portably) right.
p4raw-id: //depot/perl@9740
# that does fit that format, add it to op/re_tests, not here.
$| = 1;
-print "1..586\n";
+print "1..587\n";
BEGIN {
chdir 't' if -d 't';
print "ok " . $test++ . "\n";
}
}
+
+{
+ # from Robin Houston
+
+ my $x = "\x{12345678}";
+ $x =~ s/(.)/$1/g;
+ print "not " unless ord($x) == 0x12345678 && length($x) == 1;
+ print "ok 587\n";
+}
if (!UTF8_IS_CONTINUATION(*s))
return 0;
uv = UTF8_ACCUMULATE(uv, *s);
- if (uv < ouv)
+#if 0
+ /* Depending on the compiler the wrap of the value takig pladve
+ * between 5 and 6 bytes of UTF-8 encoding either works or not.
+ * See similar spot in utf8_to_uvuni(). --jhi */
+ if (uv < ouv)
return 0;
+#endif
ouv = uv;
s++;
}
}
}
else { /* uv < ouv */
+#if 0
+ /* Depending on the compiler the wrap of the value takig pladve
+ * between 5 and 6 bytes of UTF-8 encoding either works or not.
+ * See similar spot in is_utf8_char(). --jhi */
/* This cannot be allowed. */
warning = UTF8_WARN_OVERFLOW;
goto malformed;
+#endif
}
}
s++;