From owner-freebsd-questions@FreeBSD.ORG Tue Sep 8 06:00:36 2009 Return-Path: Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8560E106566C for ; Tue, 8 Sep 2009 06:00:36 +0000 (UTC) (envelope-from stark@mapper.nl) Received: from smtp-out3.tiscali.nl (smtp-out3.tiscali.nl [195.241.79.178]) by mx1.freebsd.org (Postfix) with ESMTP id 464B38FC12 for ; Tue, 8 Sep 2009 06:00:35 +0000 (UTC) Received: from [82.170.17.27] (helo=mapper.nl) by smtp-out3.tiscali.nl with esmtp (Exim) (envelope-from ) id 1Mktko-0008HQ-T7; Tue, 08 Sep 2009 08:00:34 +0200 Received: from bowser ([192.168.0.1] helo=[0.0.0.0]) by mapper.nl with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Mktkj-0009Q9-PT; Tue, 08 Sep 2009 08:00:29 +0200 Message-ID: <4AA5F2FB.8080006@mapper.nl> Date: Tue, 08 Sep 2009 08:00:27 +0200 From: Mark Stapper User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Gary Kline References: <20090908045202.GA16556@thought.org> In-Reply-To: <20090908045202.GA16556@thought.org> X-Enigmail-Version: 0.96.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig4D9B447E5D8A59D8C145AE86" Cc: FreeBSD Mailing List Subject: Re: how to get rid of a character, 0x80? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2009 06:00:36 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig4D9B447E5D8A59D8C145AE86 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Gary Kline wrote: > anybody know why getchar() doesn't see 0x80 =3D=3D 0200? if getchar()= > is limited to 7-bit characters, what then? > > % od -c file=20 > > shows me that every character fits into 8 bits, so getwchar() is the n= ext thing. > but doesn't getwchar grab wide-chars only: 16 bits? > > tia, guys, > > gary > > > > =20 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 =C7) 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 =C7sdfa =C7sdfa " besides.. 0x80!=3D0200 it's 0200 octal which is 128 decimal... Might be why it doesn't work for you. Greetz, Mark --------------enig4D9B447E5D8A59D8C145AE86 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----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----- --------------enig4D9B447E5D8A59D8C145AE86--