Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Sep 2009 08:02:06 -0500
From:      Jim White <spamchannel@gmail.com>
To:        Jon Radel <jon@radel.com>
Cc:        Gary Kline <kline@thought.org>, Mark Stapper <stark@mapper.nl>, FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: how to get rid of a character, 0x80?
Message-ID:  <9ca8670b0909080602ud2e4c0bq819251db916b6d3b@mail.gmail.com>
In-Reply-To: <4AA65182.6020200@radel.com>
References:  <20090908045202.GA16556@thought.org> <4AA5F2FB.8080006@mapper.nl> <4AA65182.6020200@radel.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 8, 2009 at 7:43 AM, Jon Radel <jon@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@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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9ca8670b0909080602ud2e4c0bq819251db916b6d3b>