GNU bug report logs - #69718
29.2; grep japanese-iso-8bit-unix string fails with "grep: illegal byte sequence"

Previous Next

Package: emacs;

Reported by: Akira Shirai <okshirai <at> gmail.com>

Date: Sun, 10 Mar 2024 23:49:01 UTC

Severity: normal

Found in version 29.2

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Akira Shirai <okshirai <at> gmail.com>
Cc: 69718 <at> debbugs.gnu.org
Subject: Re: bug#69718: 29.2;
 grep japanese-iso-8bit-unix string fails with "grep: illegal byte
 sequence"
Date: Mon, 11 Mar 2024 14:50:31 +0200
> Cc: 白井彰 <okshirai <at> gmail.com>
> From: Akira Shirai <okshirai <at> gmail.com>
> Date: Mon, 11 Mar 2024 08:45:33 +0900
> 
> 1. emacs -Q on macOS
> 2. evaluate (set-language-environment "Japanese")
> 3. visit the directory where SKK-JISYO.L exists (ex. ~/emacs-29.2/leim/SKK-DIC/ )
> 4. type C-x RET c to run universal-coding-system-argument command, and specify japanese-iso-8bit-unix as the coding-system
> 5. type M-x grep to run grep, and specify "grep --color=auto -nH --null -e この辞書は SKK-JISYO.L" as the command-args
>   => grep fails with "grep: illegal byte sequence"
> 
> On emacs 29.1, the grep runs successfully with the same procedures.
> If the command-args is "LANG=C grep --color=auto -nH --null -e この辞書は SKK-JISYO.L", the grep runs successfully.

I cannot reproduce this, but I'm not on macOS.

We made a change in msterm.m between Emacs 29.1 and Emacs 29.2, which
might be responsible for this: we now set the Emacs locale
differently.  But I'm not sure what you see means there's a bug in
Emacs, because it could well be a bug in Grep that you have on macOS;
for example, this page:

  https://stackoverflow.com/questions/19242275/re-error-illegal-byte-sequence-on-mac-os-x

clearly hints that this might be the case, and that setting LANG=C is
indeed the right solution for this.




This bug report was last modified 1 year and 96 days ago.

Previous Next


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