In a recent note, Thomas E. Dickey said:
> Date: Mon, 22 Oct 2001 09:36:27 -0400 (EDT)
> > >
> > > On Mon, 22 Oct 2001 [EMAIL PROTECTED] wrote:
> > >
> > > > The problem: If the last character of a string has the 0x80 bit set,
>
> then the last character of a string shouldn't have 0x80 rather than 0x00.
>
Oops. Clarification (I was not considering the terminating NUL part of
the string -- for example, strlen() doesn't count it): If the string
character preceding the terminating NUL has the 0x80 bit set ...
The offending code, distilled, is:
for (i = 0; buffer[i]; i++)
{
if (buffer[i] & 0x80) {
{ ... }
i++;
} else {
buffer[i] = UCH(TOLOWER(buffer[i]));
}
}
The i++ may skip the NUL if the preceding character has 0x80 set.
-- gil
--
StorageTek
INFORMATION made POWERFUL
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to [EMAIL PROTECTED]