Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Nov 2008 16:37:08 -0800
From:      Gary Kline <kline@thought.org>
To:        Robert Huff <roberthuff@rcn.com>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: trying to catch the triple '\0342', '\0200', '\0220' but cannot.
Message-ID:  <20081123003708.GA63125@thought.org>
In-Reply-To: <20081123000232.GA62032@thought.org>
References:  <20081122231556.GA60364@thought.org> <18728.37850.357625.984982@jerusalem.litteratus.org> <20081123000232.GA62032@thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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





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