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

From: Andrey Chernov <ache_at_nagual.pp.ru>
Date: Wed, 18 Jun 2008 15:49:17 +0400
On Wed, Jun 18, 2008 at 12:40:24PM +0200, Dag-Erling Sm??rgrav wrote:
> For grep, I believe it should simply be a matter of calling setlocale(),
> using wide strings, and using a multibyte regex engine (for appropriate
> values of "simply").

See my prev reply telling more details. Using wide strings is not so easy, 
f.e. all ctype BSD grep now uses should be converted to wctype, input 
conversion added, etc.

> Another thing I'm unsure about is the matter of input and output.  Do
> mbstowcs() / mbtowc() simply trust the input to conform to LC_CTYPE and
> convert accordingly?  When reading UTF, do they recognize and handle

They return EILSEQ on wrong sequence.

-- 
http://ache.pp.ru/
Received on Wed Jun 18 2008 - 09:49:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:32 UTC