From owner-freebsd-standards Fri Mar 1 1:14:46 2002 Delivered-To: freebsd-standards@freebsd.org Received: from descent.robbins.dropbear.id.au (253.d.010.mel.iprimus.net.au [210.50.203.253]) by hub.freebsd.org (Postfix) with ESMTP id 5F10837B400; Fri, 1 Mar 2002 01:14:41 -0800 (PST) Received: (from tim@localhost) by descent.robbins.dropbear.id.au (8.11.6/8.11.6) id g219AhH92115; Fri, 1 Mar 2002 20:10:44 +1100 (EST) (envelope-from tim) Date: Fri, 1 Mar 2002 20:10:43 +1100 From: "Tim J. Robbins" To: Mike Barcroft Cc: freebsd-standards@FreeBSD.ORG Subject: Re: wc -m option Message-ID: <20020301201043.A92102@descent.robbins.dropbear.id.au> References: <20020203230758.A19532@descent.robbins.dropbear.id.au> <20020301035348.B7544@espresso.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020301035348.B7544@espresso.q9media.com>; from mike@FreeBSD.ORG on Fri, Mar 01, 2002 at 03:53:48AM -0500 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Mar 01, 2002 at 03:53:48AM -0500, Mike Barcroft wrote: > [Late reply, prompted by other wc(1) patch.] > > Tim J. Robbins writes: > > This patch adds the SUSV2 -m option to wc to handle multibyte characters. > > Since libc is missing iswspace() from , 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