Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Sep 2009 08:00:27 +0200
From:      Mark Stapper <stark@mapper.nl>
To:        Gary Kline <kline@thought.org>
Cc:        FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG>
Subject:   Re: how to get rid of a character, 0x80?
Message-ID:  <4AA5F2FB.8080006@mapper.nl>
In-Reply-To: <20090908045202.GA16556@thought.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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,
>
> 	gary
>
>
>
>   
Hello,

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:
sfeo
sfeo
Çsdfa
Çsdfa
"
besides.. 0x80!=0200
it's 0200 octal which is 128 decimal...
Might be why it doesn't work for you.
Greetz,
Mark


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkql8v0ACgkQN9xNqOOVnWBUFgCfZJz2JbaWsrpJhSa6vZ4SeNjm
v00AoIIHVdzWb2PHDb26KDq2dQ22wLMd
=D+QA
-----END PGP SIGNATURE-----
home | help

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