In message <[EMAIL PROTECTED]>
          Roman Hunt <[EMAIL PROTECTED]> wrote:

>   I'm not too sure if this is necessary but it seems logical to get things
> into charsets our compilers can handle.  Hopefully this is the correct
> approach . . . . also this should NULL terminate in the event that the
> entire buffer had not yet been filled.

This is wrong - you need to worry about the character set as well
as the encoding, and at the very least you should compare the encoding
to the default encoding for the native charset and not assume that
it will always be singlebyte.

You buffer termination code is also wrong - bufused is the end of
the string. You are null terminating the buffer not the string, and
the buffer may have extra space. Plus you have created a buffer
overrun.

Tom

-- 
Tom Hughes ([EMAIL PROTECTED])
http://www.compton.nu/

Reply via email to