GNU bug report logs - #6546
win32 grep/shell utf-8 encoding

Previous Next

Package: emacs;

Reported by: Laimonas Vėbra <laimonas.vebra <at> gmail.com>

Date: Thu, 1 Jul 2010 08:48:02 UTC

Severity: normal

Tags: moreinfo

Merged with 6705

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Laimonas Vėbra <laimonas.vebra <at> gmail.com>
To: 6546 <at> debbugs.gnu.org
Subject: bug#6546: win32 grep/shell utf-8 encoding 
Date: Thu, 01 Jul 2010 11:46:37 +0300
Maybe it's actually not the bug (but missing functionality), but how do 
one should/could setup ones emacs && .emacs to grep files in utf-8 
encoding?

grep 2.6.3 (cygwin) at last works correctly (coloring multibyte matches) 
from win32 console (according to LANG environment settings), but no 
matter how i've tried to push emacs (set-language-environment, 
coding-system-for-(read|write), set-env in grep-setup-hook), it just 
don't work, because somewhere inside the Emacs win32 stuff it sticks to 
windows locale codepage and tries hard to convert to this 
codepage/encoding before it passes arguments to shell. No wonder -- it 
fails when it comes to unicode.

How to reproduce:

Create utf-8 file with some unicode characters (Cyrillic, Baltic, 
whatever; not only ascii) and try to grep for some utf-8 strings from 
Emacs (M-x grep).




This bug report was last modified 3 years and 87 days ago.

Previous Next


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