internal char ScanOctal()
{
int d;
int i;
int c;
// Consume octal chars only up to 3 digits and value 0377
c = 3;
if (c > CharsRight())
c = CharsRight();
for (i = 0; c > 0 && (uint)(d = RightChar() - '0') <= 7; c -= 1)
{
MoveRight();
i *= 8;
i += d;
if (UseOptionE() && i >= 0x20)
break;
}
// Octal codes only go up to 255. Any larger and the behavior that Perl follows
// is simply to truncate the high bits.
i &= 0xFF;
return (char)i;
}