From owner-freebsd-questions@FreeBSD.ORG Sun Nov 23 00:37:14 2008 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 4DFF8106564A for ; Sun, 23 Nov 2008 00:37:14 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (aristotle.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id 0894F8FC08 for ; Sun, 23 Nov 2008 00:37:13 +0000 (UTC) (envelope-from kline@thought.org) Received: from thought.org (tao.thought.org [10.47.0.250]) (authenticated bits=0) by aristotle.thought.org (8.14.2/8.14.2) with ESMTP id mAN0bbe3078763; Sat, 22 Nov 2008 16:37:38 -0800 (PST) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Sat, 22 Nov 2008 16:37:09 -0800 (PST) Date: Sat, 22 Nov 2008 16:37:08 -0800 From: Gary Kline To: Robert Huff Message-ID: <20081123003708.GA63125@thought.org> References: <20081122231556.GA60364@thought.org> <18728.37850.357625.984982@jerusalem.litteratus.org> <20081123000232.GA62032@thought.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081123000232.GA62032@thought.org> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 22 years of service to the Unix community. X-Spam-Status: No, score=-4.4 required=3.6 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on aristotle.thought.org Cc: FreeBSD Mailing List Subject: Re: trying to catch the triple '\0342', '\0200', '\0220' but cannot. 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: Sun, 23 Nov 2008 00:37:14 -0000 On Sat, Nov 22, 2008 at 04:02:32PM -0800, Gary Kline wrote: > On Sat, Nov 22, 2008 at 06:20:58PM -0500, Robert Huff wrote: > > > > Gary Kline writes: > > > > > can somebody help me catch the OOo "'" (aposhtrophe)? It's a triplet > > > of the hex chars, xe2, x80, x90, which should be seeable by getchar() > > > [[or *not*?]]. The octal are 0342, 0200, and 0220. > > > > > > The first is, is a-circumflex. Why doesn't > > > > > > if ((ch1 = getchar()) == '\0342') or, more simply, > > > if ((ch1 = getchar()) == '\342') > > > catch the first? Is getchar limited to only 7 bytes?? > > > > Perhaps you want getwc()? > > > Are all these really 16-bit characters? I'll try getwc, tx. well, the getwchar()/getwc(stdin) code following fails: I get the 1st ch and it is echoed correctly with printf, but if ( ch == '\0342') doesn't catch the bytes I'm looking for? Ideas? gary > > > > > > > > Robert Huff > > > > -- > Gary Kline kline@thought.org http://www.thought.org Public Service Unix > http://jottings.thought.org http://transfinite.thought.org > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org