Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Jun 2002 23:12:36 +1000
From:      "Tim J. Robbins" <tjr@FreeBSD.ORG>
To:        standards@FreeBSD.ORG
Subject:   Re: cvs commit: src/usr.bin/wc wc.1 wc.c
Message-ID:  <20020613231236.A69696@treetop.robbins.dropbear.id.au>
In-Reply-To: <200206131248.g5DCmol89972@freefall.freebsd.org>; from tjr@FreeBSD.ORG on Thu, Jun 13, 2002 at 05:48:50AM -0700
References:  <200206131248.g5DCmol89972@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 13, 2002 at 05:48:50AM -0700, Tim J. Robbins wrote:
> tjr         2002/06/13 05:48:50 PDT
> 
>   Modified files:
>     usr.bin/wc           wc.1 wc.c 
>   Log:
>   Add the -m option, which counts characters (as opposed to -c, which
>   counts bytes). In locales that don't have multibyte characters, -m
>   is effectively an alias for -c.
>   
>   This brings wc(1) up to P1003.1-2001 conformance.

I had planned to wait until the wide character stdio support was implemented,
but I don't think wc(1) would have benefited at all from it. I'm fairly
confident that this approach is faster than a fgetwc()-based loop in both
single- and multi- byte encodings.

There aren't many other utilities that are this simple, so most of the work
in supporting multibyte locales will have to wait until wide char stdio is
implemented. I feel that supporting wide characters properly is very
important as encodings like UTF-8 are becoming quite popular.


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?20020613231236.A69696>