Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Mar 2002 20:10:43 +1100
From:      "Tim J. Robbins" <tim@robbins.dropbear.id.au>
To:        Mike Barcroft <mike@FreeBSD.ORG>
Cc:        freebsd-standards@FreeBSD.ORG
Subject:   Re: wc -m option
Message-ID:  <20020301201043.A92102@descent.robbins.dropbear.id.au>
In-Reply-To: <20020301035348.B7544@espresso.q9media.com>; from mike@FreeBSD.ORG on Fri, Mar 01, 2002 at 03:53:48AM -0500
References:  <20020203230758.A19532@descent.robbins.dropbear.id.au> <20020301035348.B7544@espresso.q9media.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 01, 2002 at 03:53:48AM -0500, Mike Barcroft wrote:

> [Late reply, prompted by other wc(1) patch.]
> 
> Tim J. Robbins <tim@robbins.dropbear.id.au> writes:
> > This patch adds the SUSV2 -m option to wc to handle multibyte characters.
> > Since libc is missing iswspace() from <wctype.h>, I've had to use isspace(),
> > which doesn't detect some wide space characters. For example, the Japanese
> > locale given in euc(4):
> 
> I think we should wait on this until we have the proper libc support
> (which hopefully won't take too long).

Agreed. getwchar() will make it much simpler and hopefully faster than the
method that patch I made used.

The ideal way, which will be possible when we get that function, will be to
setlocale(LC_CTYPE, "") if -m is given, otherwise "C".

I'll submit a new patch when getwchar() arrives.


Tim

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-standards" in the body of the message




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