GNU bug report logs - #25544
regression: Windows version grep not search two non ASCII words separated by space

Previous Next

Package: grep;

Reported by: Михаил Гаврилов <mikhail.v.gavrilov <at> gmail.com>

Date: Thu, 26 Jan 2017 16:31:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 25544 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Михаил Гаврилов
 <mikhail.v.gavrilov <at> gmail.com>
Cc: 25544 <at> debbugs.gnu.org
Subject: Re: bug#25544: regression: Windows version grep not search two non
 ASCII words separated by space
Date: Sun, 29 Jan 2017 19:53:04 +0200
> From: Михаил Гаврилов
> 	<mikhail.v.gavrilov <at> gmail.com>
> Date: Thu, 26 Jan 2017 16:17:42 +0500
> 
> Windows version grep not search two non ASCII words separated by space
> More details described here: https://github.com/geany/geany/issues/1366
> Last workable version is 2.24

The detailed description indicates that the problem happens when the
Windows console output is switched to UTF-8, and therefore the file
being searched includes the Cyrillic text encoded in UTF-8.
Therefore, my crystal ball says that the root cause of this is because
Windows non-ASCII character functions from the C runtime library
cannot support UTF-8 as the multibyte encoding.

My suggestion is not to use UTF-8 on Windows in conjunction with
software ported from Posix systems, because making such ports support
UTF-8 on Windows is a very large job (in a nutshell, you need to
replace all the runtime functions with alternative versions, and if
you want support beyond the BMP, you need to use a 32-bit data type
instead of wchar_t).  In the particular case in point, I suggest to
use a single-byte codepage that supports Cyrillic letters.  Then the
problem should go away.




This bug report was last modified 8 years and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.