convertible to bytes by checking it doesn't go above 0xc3
Subject: Re: perl@7078
Message-ID: <
20000914205919.A11098@deep-dark-truthful-mirror.perlhacker.org>
p4raw-id: //depot/perl@7084
/* ensure valid UTF8 and chars < 256 before updating string */
while (s < send) {
U8 c = *s++;
- if (c >= 0x80 &&
- ( (s >= send) || ((*s++ & 0xc0) != 0x80) || ((c & 0xfe) != 0xc2))) {
+ if ( (s >= send) || (*s & 0x80 && c > 0xc3)) {
*len = -1;
return 0;
}