CFT: BSD-licensed grep [Fwd: cvs commit: ports/textproc/bsdgrep Makefile distinfo]

Gabor Kovesdan gabor at
Tue Jun 17 07:21:57 UTC 2008

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...


More information about the freebsd-hackers mailing list