On Wed, 31 Jan 2007 16:40:43 +0100 William James wrote:
> On 1/29/07, Roland Mainz <roland.mainz at nrubsig.org> wrote:
> > > That works in the en_US.iso885915 locale but in en_US.utf8 it fails:
> > > $ printf "%u\n" $(('1'))
> > > 49
> > > $ printf "%u\n" $(('?'))
> > > ksh: '?': arithmetic syntax error
> >
> > Umpf... it seems the code uses |char| where it should use |wchar_t| to
> > handle locale-specific character values > 127 (AFAIK using |wchar_t| is
> > the best choice in this case... David ?).

the lowest level routine assumed byte==char (c = *s++)
switching to the ast (c = mbchar(s)) fixes the problem

-- Glenn Fowler -- AT&T Research, Florham Park NJ --


Reply via email to