From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 17 07:21:57 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 378901065673; Tue, 17 Jun 2008 07:21:57 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from viefep19-int.chello.at (viefep18-int.chello.at [213.46.255.22]) by mx1.freebsd.org (Postfix) with ESMTP id EF70D8FC27; Tue, 17 Jun 2008 07:21:55 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from [89.134.207.231] by viefep19-int.chello.at (InterMail vM.7.08.02.02 201-2186-121-104-20070414) with ESMTP id <20080617072154.UHJP24527.viefep19-int.chello.at@[89.134.207.231]>; Tue, 17 Jun 2008 09:21:54 +0200 Message-ID: <48576610.9080808@FreeBSD.org> Date: Tue, 17 Jun 2008 09:21:52 +0200 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: Andrey Chernov , Dag-Erling Sm??rgrav , Doug Barton , K?vesd?n G?bor , Diomidis Spinellis , hackers@FreeBSD.org, current@FreeBSD.org, "Sean C. Farley" , Max Khon References: <485453F2.60507@FreeBSD.org> <4854BC29.3060507@FreeBSD.org> <4854C96A.1080603@aueb.gr> <48556AAD.9010602@t-hosting.hu> <20080615212613.GA97326@nagual.pp.ru> <4855EDFE.3010708@FreeBSD.org> <86bq211rqw.fsf@ds4.des.no> <20080617002224.GA16122@nagual.pp.ru> <20080617002808.GB16122@nagual.pp.ru> <20080617004647.GA16546@nagual.pp.ru> In-Reply-To: <20080617004647.GA16546@nagual.pp.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: Re: CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 07:21:57 -0000 Andrey Chernov escribió: > On Tue, Jun 17, 2008 at 04:28:10AM +0400, Andrey Chernov wrote: > >> BSD grep is even not bothering to call setlocale(). I can't say is it can >> be simple healed by adding that call, some test suite run is needed. >> > > Quick source inspection reveals that BSD grep operates with single bytes > only (util.c) so big rewriting with mbrtowc() is needed. Adding > setlocale() only will makes it only useable with single byte locales, in > success case. > Sorry for the possibly silly question, but what we mean localization here in the case of grep? As far as I see, it works with wide chars, because the regex library is aware of those. What other aspect needs to be taken into account? In case of sort, I understarnd that it should explicitly handle wide characters due to the different alphabet of the different languages and yes, that seems to be a difficult task... Gábor