how to get rid of a character, 0x80?

Jim White spamchannel at gmail.com
Tue Sep 8 13:34:28 UTC 2009


On Tue, Sep 8, 2009 at 7:43 AM, Jon Radel <jon at radel.com> wrote:

> Mark Stapper wrote:
>
>  besides.. 0x80!=0200
>> it's 0200 octal which is 128 decimal...
>> Might be why it doesn't work for you.
>>
>
> Don't mess with his head.  ;-)
>
> 0200 = 0x80 = 128
>
> 200 octal = 80 hex = 128 decimal
>
> --
>
> --Jon Radel
> jon at radel.com
>

You may want to check if your char type is signed.  If it is (and it just
happens to be 8 bits wide), (char)128 is a negative value.


More information about the freebsd-questions mailing list