how to get rid of a character, 0x80?
stark at mapper.nl
Tue Sep 8 06:00:36 UTC 2009
Gary Kline wrote:
> anybody know why getchar() doesn't see 0x80 == 0200? if getchar()
> is limited to 7-bit characters, what then?
> % od -c file
> shows me that every character fits into 8 bits, so getwchar() is the next thing.
> but doesn't getwchar grab wide-chars only: 16 bits?
> tia, guys,
First of, this isn't really a BSD question.
Second, if you have an example code we might be able to help.
Presumably, you want to read a capital C with cedille? (0x80 128 Ç)
Example from: http://www.cplusplus.com/reference/clibrary/cstdio/getchar/
compiled on FreeBSD 7.2 with gcc 4.2.1 output:
Enter text. Include a dot ('.') in a sentence to exit:
it's 0200 octal which is 128 decimal...
Might be why it doesn't work for you.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 259 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090908/c1b6cc79/signature-0001.pgp
More information about the freebsd-questions