From owner-freebsd-questions@FreeBSD.ORG Sat Nov 22 23:21:00 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 61B791065678 for ; Sat, 22 Nov 2008 23:21:00 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id 16FDF8FC16 for ; Sat, 22 Nov 2008 23:20:59 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from mr02.lnh.mail.rcn.net ([207.172.157.22]) by smtp02.lnh.mail.rcn.net with ESMTP; 22 Nov 2008 18:20:59 -0500 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr02.lnh.mail.rcn.net (MOS 3.8.6-GA) with ESMTP id PGN54157; Sat, 22 Nov 2008 18:20:58 -0500 (EST) Received: from unknown (HELO jerusalem.litteratus.org.litteratus.org) ([209.6.22.188]) by smtp01.lnh.mail.rcn.net with ESMTP; 22 Nov 2008 18:20:59 -0500 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18728.37850.357625.984982@jerusalem.litteratus.org> Date: Sat, 22 Nov 2008 18:20:58 -0500 To: Gary Kline In-Reply-To: <20081122231556.GA60364@thought.org> References: <20081122231556.GA60364@thought.org> X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" XEmacs Lucid X-Junkmail-Whitelist: YES (by domain whitelist at mr02.lnh.mail.rcn.net) Cc: FreeBSD Mailing List Subject: 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: Sat, 22 Nov 2008 23:21:00 -0000 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()? Robert Huff