bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#69718: 29.2; grep japanese-iso-8bit-unix string fails with "grep: il


From: Eli Zaretskii
Subject: bug#69718: 29.2; grep japanese-iso-8bit-unix string fails with "grep: illegal byte sequence"
Date: Tue, 12 Mar 2024 21:39:03 +0200

> From: Akira Shirai <okshirai@gmail.com>
> Date: Wed, 13 Mar 2024 00:42:22 +0900
> Cc: 69718@debbugs.gnu.org,
>  okshirai@joy.ocn.ne.jp
> 
> emacs-29.1 executes /usr/bin/grep without LANG,
> but emacs-29.2 seems to execute /usr/bin/grep with LANG=en_US.UTF-8.

The fact that LANG could cause this is IMO a bug in macOS's Grep.

There's no problem for Emacs to put LANG into the environment, but
Grep can be invoked on several very different files, with no single
LANG that fits all of them.  Grep should not use LANG at all.

> I wonder /usr/bin/grep should be invoked in non UTF-8 mode, because emacs 
> might pass non UTF-8 byte sequence to /usr/bin/grep.

Illegal byte sequence is not limited to UTF-8.  There really is no
good solution for this, except in Grep itself.  Which is why I don't
think this is an Emacs bug.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]