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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Akira Shirai <okshirai@HIDDEN>; dated Sun, 10 Mar 2024 23:49:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 69718 <at> debbugs.gnu.org:


Received: (at 69718) by debbugs.gnu.org; 13 Mar 2024 14:09:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 13 10:09:32 2024
Received: from localhost ([127.0.0.1]:47062 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rkPIO-0002XZ-PD
	for submit <at> debbugs.gnu.org; Wed, 13 Mar 2024 10:09:32 -0400
Received: from mail-pj1-f42.google.com ([209.85.216.42]:51504)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <okshirai@HIDDEN>) id 1rkPIJ-0002XF-S0
 for 69718 <at> debbugs.gnu.org; Wed, 13 Mar 2024 10:09:27 -0400
Received: by mail-pj1-f42.google.com with SMTP id
 98e67ed59e1d1-29bd4dfbf56so2832328a91.3
 for <69718 <at> debbugs.gnu.org>; Wed, 13 Mar 2024 07:08:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1710338863; x=1710943663; darn=debbugs.gnu.org;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=b17BTWTulwhZOYY/JflNXoFHOTTM8wDtOgdzwdKJe1I=;
 b=d3+Y+APYNTwwcO2fg70AZnG5imCp3l43hHB4xm0Pcf7MW8LLEH9Z8/1xM6Kg+uqfOy
 H4T+FJPmQwscTNvXTXKA8kH+Sf4PloL0IgSaasY+xetvZTx68/595fEpDi9Gm61/Ckv7
 9wdqxbulS/Ng2D5Hc/eJ1ANe68ANn0gIx7dCZlf7qyRn80mRuFF99ddXvY5RP5mwkpY1
 O/zsUVykHH9g1tECt4OstocG6QAYTHUoAEXJxonP05Js8hsItBOjirKovP3FDPDSFN+V
 68UDZroZZSAdP7yESJIG8LGAVLIdypUvrT8ZvkXAbmPLFLTmysiR81bN7m1IJ/dY6BD+
 wW8A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1710338863; x=1710943663;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=b17BTWTulwhZOYY/JflNXoFHOTTM8wDtOgdzwdKJe1I=;
 b=kplg+/XqAcQtxi3WTi/Zx5pSttfvNDsuXUt4QWwoOjSkHrZI0cP4c7RvrZOq6jnRjm
 vnOZFER37bqBw1oc9YJz+Z+r7aKUYz+6YsJajTeQOSiq9fQ/DGUR3fmZ3xtV3g56t5sS
 0P7wYKDbR6/rtNXMwq7akZgA0qL+hpHAPEMItB32rYrdMEuDz9P3mV21HWGUGAmMgfB+
 iSJcLlSHaa1j97vS7Zid9OZRPcgHP8tpHKfYUzxLtIpoqn2cS/QIJd9me4yuvi4Dh1SN
 tdDsJcAMWcBCSQL5f4FFVNzWgkixnB5Gv8H02IduJj6f+Rlo0zI5K/ETznmphR5frExH
 iHRg==
X-Gm-Message-State: AOJu0Yy/sH7fS3gzG3hY1nSVMLi+nxgfdZ0hgdQmCjKTC/l/6B/MSrK9
 hXILghOVAYWPVna5lrfAoEwUc8bl6q+BPpiUZ/mScu1hy6t16Qmd
X-Google-Smtp-Source: AGHT+IHaNW6ltfoxXEUuKUEkRjDrGlpjYzS0bE4uYFA6i18Q6SHK7FT44L+LsuZRLbbLqZ9l8RByRw==
X-Received: by 2002:a17:90a:3f86:b0:29b:4d0b:66ab with SMTP id
 m6-20020a17090a3f8600b0029b4d0b66abmr9087218pjc.33.1710338862729; 
 Wed, 13 Mar 2024 07:07:42 -0700 (PDT)
Received: from smtpclient.apple
 (p4512251-ipxg23101hodogaya.kanagawa.ocn.ne.jp. [153.205.36.251])
 by smtp.gmail.com with ESMTPSA id
 k12-20020a17090a62cc00b0029bb433dc8asm1386600pjs.15.2024.03.13.07.07.40
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 13 Mar 2024 07:07:42 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\))
Subject: Re: bug#69718: 29.2; grep japanese-iso-8bit-unix string fails with
 "grep: illegal byte sequence"
From: Akira Shirai <okshirai@HIDDEN>
In-Reply-To: <86frwvtf3c.fsf@HIDDEN>
Date: Wed, 13 Mar 2024 23:07:27 +0900
Content-Transfer-Encoding: quoted-printable
Message-Id: <5EAA3198-4728-4B98-A9C2-78D16BC759A4@HIDDEN>
References: <8F538035-DB9D-4323-AD96-81647300C509@HIDDEN>
 <86il1tue3s.fsf@HIDDEN> <86cys0vri9.fsf@HIDDEN>
 <219184D7-3818-47AA-9722-BD4BCE85C0A0@HIDDEN> <86frwvtf3c.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3774.400.31)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 69718
Cc: =?utf-8?B?55m95LqV5b2w?= <okshirai@HIDDEN>, 69718 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

If LANG=3Dlocale grep [-e pattern] [file ...] is specified, macOS grep =
checks the consistency between the locale and the byte sequence of the =
pattern,
but does not check the consistency between the locale and the byte =
sequence of the file contents.
(Please see *1 below)

This consistency check feature can be disabled if LANG=3DC is specified =
or LANG is not specified.

emacs-29.1 executes /usr/bin/grep without LANG (*2),
but emacs-29.2 seems to execute /usr/bin/grep with LANG=3Den_US.UTF-8 =
(*3).

I wonder that in some cases emacs should invoke subprocesses with LANG=3DC=
 is specified or LANG is not specified,
and this grep issue might be one of the case.

----------------------------------------------------------------------
*1 If LANG=3Dlocale grep [-e pattern] [file ...] is specified, macOS =
grep checks the consistency between the locale and the byte sequence of =
the pattern,
but does not check the consistency between the locale and the byte =
sequence of the file contents.

% cd ~/emacs-29.2/leim/SKK-DIC

/*
 * locale (=3D $LANG): en_US.UTF-8
 * pattern (=3D $aaa): UTF-8
 * file:             eucJP
 *   =3D> Though the encodings of locale and file are inconsistent, grep =
executes successfully without any hit
 */
% export aaa=3D=E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF; export =
bbb=3D`echo $aaa | iconv -f utf-8 -t eucJP`; LANG=3Den_US.UTF-8 grep =
--color=3Dauto -nH --null -e $aaa SKK-JISYO.L | iconv -f eucJP -t utf-8

/*
 * locale (=3D $LANG): en_US.UTF-8
 * pattern (=3D $bbb): eucJP
 * file:             eucJP
 *   =3D> Because the encodings of locale and pattern are inconsistent, =
grep fails with illegal byte sequence
 */
% export aaa=3D=E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF; export =
bbb=3D`echo $aaa | iconv -f utf-8 -t eucJP`; LANG=3Den_US.UTF-8 grep =
--color=3Dauto -nH --null -e $bbb SKK-JISYO.L | iconv -f eucJP -t utf-8
grep: illegal byte sequence

/*
 * locale (=3D $LANG): C
 * pattern (=3D $bbb): eucJP
 * file:             eucJP
 *   =3D> Because the encodings of locale is C, grep does not check the =
consistency between the locale and the byte sequence of the pattern and =
executes successfully with one hit
 */
% export aaa=3D=E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF; export =
bbb=3D`echo $aaa | iconv -f utf-8 -t eucJP`; LANG=3DC grep --color=3Dauto =
-nH --null -e $bbb SKK-JISYO.L | iconv -f eucJP -t utf-8
SKK-JISYO.L=0035:;; =E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF=E3=80=81=
SKK =E5=8E=9F=E4=BD=9C=E8=80=85=E3=81=AE=E4=BD=90=E8=97=A4=E9=9B=85=E5=BD=A6=
=E5=85=88=E7=94=9F=E3=81=8C=E3=80=81=E7=AC=AC 1 =
=E7=89=88=E4=BD=9C=E6=88=90=E3=81=AE=E3=81=9F=E3=82=81=E3=81=AB=E6=9D=B1=E5=
=8C=97=E5=A4=A7=E5=AD=A6

/*
 * locale (=3D $LANG): unspecified
 * pattern (=3D $bbb): eucJP
 * file:             eucJP
 *   =3D> Because the encodings of locale is not specified, grep does =
not check the consistency between the locale and the byte sequence of =
the pattern and executes successfully with one hit
 */
% export aaa=3D=E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF; export =
bbb=3D`echo $aaa | iconv -f utf-8 -t eucJP`; LANG=3D grep --color=3Dauto =
-nH --null -e $bbb SKK-JISYO.L | iconv -f eucJP -t utf-8
SKK-JISYO.L=0035:;; =E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF=E3=80=81=
SKK =E5=8E=9F=E4=BD=9C=E8=80=85=E3=81=AE=E4=BD=90=E8=97=A4=E9=9B=85=E5=BD=A6=
=E5=85=88=E7=94=9F=E3=81=8C=E3=80=81=E7=AC=AC 1 =
=E7=89=88=E4=BD=9C=E6=88=90=E3=81=AE=E3=81=9F=E3=82=81=E3=81=AB=E6=9D=B1=E5=
=8C=97=E5=A4=A7=E5=AD=A6

----------------------------------------------------------------------
*2 emacs-29.1 executes /usr/bin/grep without LANG

/*
 * emacs-29.1
 * grep executes successfully with one hit
 * printenv shows that the subprocess is invokeed with LANG unspecified
 */

-*- mode: grep; default-directory: "~/emacs-29.1/leim/SKK-DIC/" -*-
Grep started at Wed Mar 13 22:21:06

grep --color=3Dauto -nH --null -e =E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=
=AF SKK-JISYO.L; printenv
SKK-JISYO.L:35:;; =E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF=E3=80=81SK=
K =E5=8E=9F=E4=BD=9C=E8=80=85=E3=81=AE=E4=BD=90=E8=97=A4=E9=9B=85=E5=BD=A6=
=E5=85=88=E7=94=9F=E3=81=8C=E3=80=81=E7=AC=AC 1 =
=E7=89=88=E4=BD=9C=E6=88=90=E3=81=AE=E3=81=9F=E3=82=81=E3=81=AB=E6=9D=B1=E5=
=8C=97=E5=A4=A7=E5=AD=A6
GREP_COLOR=3D01;31
SHELL=3D/bin/bash
TERM=3Demacs-grep
TMPDIR=3D/var/folders/4l/q0w9w6j914q2n_v7qyysbrhh0000gn/T/
USER=3Dshiraiakira
COMMAND_MODE=3Dunix2003
GREP_COLORS=3Dmt=3D01;31:fn=3D:ln=3D:bn=3D:se=3D:sl=3D:cx=3D:ne
SSH_AUTH_SOCK=3D/private/tmp/com.apple.launchd.yfsSXeLGOX/Listeners
__CF_USER_TEXT_ENCODING=3D0x1F5:0x1:0xE
PAGER=3D
PATH=3D/usr/bin:/bin:/usr/sbin:/sbin
LaunchInstanceID=3D8A9BF0A3-3EF0-4A5E-B1A2-E3E4FE729A53
__CFBundleIdentifier=3Dorg.gnu.Emacs
PWD=3D/Users/shiraiakira/emacs-29.1/leim/SKK-DIC
XPC_FLAGS=3D0x0
XPC_SERVICE_NAME=3D0
SHLVL=3D1
HOME=3D/Users/shiraiakira
LOGNAME=3Dshiraiakira
DISPLAY=3DF9A6231BCF26.local
INSIDE_EMACS=3D29.1,compile
SECURITYSESSIONID=3D186a2
_=3D/usr/bin/printenv

Grep finished with 1 match found at Wed Mar 13 22:21:06

----------------------------------------------------------------------
*3 emacs-29.2 seems to execute /usr/bin/grep with LANG=3Den_US.UTF-8

/*
 * emacs-29.2
 * grep fails with illegal byte sequence
 * printenv shows that the subprocess is invoked with LANG=3Den_US.UTF-8
 */

-*- mode: grep; default-directory: "~/emacs-29.2/leim/SKK-DIC/" -*-
Grep started at Wed Mar 13 22:19:25

grep --color=3Dauto -nH --null -e =E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=
=AF SKK-JISYO.L; printenv
grep: illegal byte sequence
GREP_COLOR=3D01;31
SHELL=3D/bin/bash
TERM=3Demacs-grep
TMPDIR=3D/var/folders/4l/q0w9w6j914q2n_v7qyysbrhh0000gn/T/
USER=3Dshiraiakira
COMMAND_MODE=3Dunix2003
GREP_COLORS=3Dmt=3D01;31:fn=3D:ln=3D:bn=3D:se=3D:sl=3D:cx=3D:ne
SSH_AUTH_SOCK=3D/private/tmp/com.apple.launchd.yfsSXeLGOX/Listeners
__CF_USER_TEXT_ENCODING=3D0x1F5:0x1:0xE
PAGER=3D
PATH=3D/usr/bin:/bin:/usr/sbin:/sbin
LaunchInstanceID=3D8A9BF0A3-3EF0-4A5E-B1A2-E3E4FE729A53
__CFBundleIdentifier=3Dorg.gnu.Emacs
PWD=3D/Users/shiraiakira/emacs-29.2/leim/SKK-DIC
LANG=3Den_US.UTF-8
XPC_FLAGS=3D0x0
XPC_SERVICE_NAME=3D0
SHLVL=3D1
HOME=3D/Users/shiraiakira
LOGNAME=3Dshiraiakira
DISPLAY=3DF9A6231BCF26.local
INSIDE_EMACS=3D29.2,compile
SECURITYSESSIONID=3D186a2
_=3D/usr/bin/printenv

Grep finished with matches found at Wed Mar 13 22:19:25


> 2024/03/13 4:39=E3=80=81Eli Zaretskii <eliz@HIDDEN>=E3=81=AE=E3=83=A1=E3=
=83=BC=E3=83=AB:
>=20
>> From: Akira Shirai <okshirai@HIDDEN>
>> Date: Wed, 13 Mar 2024 00:42:22 +0900
>> Cc: 69718 <at> debbugs.gnu.org,
>> okshirai@HIDDEN
>>=20
>> emacs-29.1 executes /usr/bin/grep without LANG,
>> but emacs-29.2 seems to execute /usr/bin/grep with LANG=3Den_US.UTF-8.
>=20
> The fact that LANG could cause this is IMO a bug in macOS's Grep.
>=20
> 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.
>=20
>> 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.
>=20
> 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.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69718; Package emacs. Full text available.

Message received at 69718 <at> debbugs.gnu.org:


Received: (at 69718) by debbugs.gnu.org; 12 Mar 2024 19:39:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 12 15:39:57 2024
Received: from localhost ([127.0.0.1]:43864 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rk7yd-0007tN-To
	for submit <at> debbugs.gnu.org; Tue, 12 Mar 2024 15:39:57 -0400
Received: from eggs.gnu.org ([209.51.188.92]:35860)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rk7ya-0007t9-NJ
 for 69718 <at> debbugs.gnu.org; Tue, 12 Mar 2024 15:39:54 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rk7xt-0003IJ-SE; Tue, 12 Mar 2024 15:39:11 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=nSc3BTGY3EBk/KpW8EXvgO51HVMSZBu04GZszR/N0cQ=; b=dyDLrmmqRXoI
 Nwbw79o8FVILoIFVwjDVydHCo8pHZAwqpO3hcPDDznJoDaotyBsFZN1dSBxLPSUzocMs+5jCwVxJ8
 FNJG+08eQbSuX5r1HN7KBScuZsBJA7IKv7z/NqfScrkX71pmYbqNlziZQePUyak6FU/nRUoh0lqlT
 Tb7PMQj0Jb68ftauHSN2qDfRN5y9GJYRXNVvaJaQoWGG/lljAHA+e25aaJdefvorBJOR9oaYtWxH5
 z5fj/W5vwnx1fkwI8Zmyt5fg9ZYfxEUT5Q+ZUEaKTqBXVlmQ/V14DmnbL5qLvS9ycpAPc9CSVRkYd
 /QWtMJLOUp8P+KqtCa/tow==;
Date: Tue, 12 Mar 2024 21:39:03 +0200
Message-Id: <86frwvtf3c.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Akira Shirai <okshirai@HIDDEN>
In-Reply-To: <219184D7-3818-47AA-9722-BD4BCE85C0A0@HIDDEN> (message from
 Akira Shirai on Wed, 13 Mar 2024 00:42:22 +0900)
Subject: Re: bug#69718: 29.2; grep japanese-iso-8bit-unix string fails with
 "grep: illegal byte sequence"
References: <8F538035-DB9D-4323-AD96-81647300C509@HIDDEN>
 <86il1tue3s.fsf@HIDDEN> <86cys0vri9.fsf@HIDDEN>
 <219184D7-3818-47AA-9722-BD4BCE85C0A0@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69718
Cc: okshirai@HIDDEN, 69718 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Akira Shirai <okshirai@HIDDEN>
> Date: Wed, 13 Mar 2024 00:42:22 +0900
> Cc: 69718 <at> debbugs.gnu.org,
>  okshirai@HIDDEN
> 
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69718; Package emacs. Full text available.

Message received at 69718 <at> debbugs.gnu.org:


Received: (at 69718) by debbugs.gnu.org; 12 Mar 2024 15:44:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 12 11:44:19 2024
Received: from localhost ([127.0.0.1]:43436 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rk4Id-0007AK-HJ
	for submit <at> debbugs.gnu.org; Tue, 12 Mar 2024 11:44:19 -0400
Received: from mail-oa1-f51.google.com ([209.85.160.51]:58649)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <okshirai@HIDDEN>) id 1rk4Ib-0007A6-0T
 for 69718 <at> debbugs.gnu.org; Tue, 12 Mar 2024 11:44:18 -0400
Received: by mail-oa1-f51.google.com with SMTP id
 586e51a60fabf-22187576d54so4323447fac.1
 for <69718 <at> debbugs.gnu.org>; Tue, 12 Mar 2024 08:43:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1710258157; x=1710862957; darn=debbugs.gnu.org;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=bDCPEZoR9NoQf4lmjW8fFbbiuAfOfPP83Kg6f61+6dw=;
 b=CyuMBvDoglBcoRwCKfdmSfz2kXY6edqUu+RwtloZ8Prkz2s0UZvcXACsdoowGdVnHL
 Oq2ziKjRCa1zmZrvZT2ASk4d8yLNJB1/OA7HLz8ueVvtawZsbEkBCeqc34M0+SbjzhBm
 Qw9v7eWXPeNc/ftwyAbKTBvBzRpAbliYVRdUJouIuh2BLf8Yu4sFyFSHUEGU53QONmb2
 AcrR15ilcuyIE1qMJPAon0YZ+V3ihzAxuNJXNzs8ZxoL0Ky8J6h6htb+1JlJZZZfwPcq
 tylAFK13f13+omNdJZU9afylcNn/OTsczOBfAP+hRZUTg7t4D1cYSELuQkiF9AAEuPM5
 38wg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1710258157; x=1710862957;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=bDCPEZoR9NoQf4lmjW8fFbbiuAfOfPP83Kg6f61+6dw=;
 b=w41QAdtKhw4TZU3XEbAzrRuJGwc2W6NafDgtmR017asCnNwAORKzibS7aWksBlME75
 DM3Q7s9N19ATWg9u2s8540c8u7fmn5svWaKFOb3lLqCndWdImcEtl5Xoq1/PuQmKG81C
 uegPQFSmPYHfwAH4Xye+eezt/e0OkLmdWNomsnYTqH4cV/briRoiqJgxFl4ZT3j9NNR+
 Xxbf2k936sOGWxFsKvxygscuXdGulxVyKFBACVMTwSJ7SPNkl1HpZ+u1V7p1GhIgEya0
 ZCelP0PBhnfbt/qZ5N4GdyCWqFIfGyd34zG4VDGpiXcdaVbTcwKu0+hiWanwXIlT31Sf
 8RvQ==
X-Gm-Message-State: AOJu0Yx8LI9eh2zfqXhC0tUSrgBxBo31sx0tZRbZlZK2362QJj2E92t+
 ILar8RmLAo8L9b7YydItSYigupfUvM/hftDTotRa9ZvtGePYm+eB
X-Google-Smtp-Source: AGHT+IGe3ci9XzTSBckzlWvv5xGfWDSxW9LbwTFb5rk1reiqkR7qgonpR7cnJkeMGgNkBypxk/aPRQ==
X-Received: by 2002:a05:6870:82a8:b0:21f:728a:e0c8 with SMTP id
 q40-20020a05687082a800b0021f728ae0c8mr8985667oae.22.1710258156761; 
 Tue, 12 Mar 2024 08:42:36 -0700 (PDT)
Received: from smtpclient.apple
 (p4512251-ipxg23101hodogaya.kanagawa.ocn.ne.jp. [153.205.36.251])
 by smtp.gmail.com with ESMTPSA id
 g24-20020a635218000000b005cf450e91d2sm6246980pgb.52.2024.03.12.08.42.35
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Tue, 12 Mar 2024 08:42:36 -0700 (PDT)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\))
Subject: Re: bug#69718: 29.2; grep japanese-iso-8bit-unix string fails with
 "grep: illegal byte sequence"
From: Akira Shirai <okshirai@HIDDEN>
In-Reply-To: <86cys0vri9.fsf@HIDDEN>
Date: Wed, 13 Mar 2024 00:42:22 +0900
Content-Transfer-Encoding: quoted-printable
Message-Id: <219184D7-3818-47AA-9722-BD4BCE85C0A0@HIDDEN>
References: <8F538035-DB9D-4323-AD96-81647300C509@HIDDEN>
 <86il1tue3s.fsf@HIDDEN> <86cys0vri9.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3774.400.31)
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 69718
Cc: okshirai@HIDDEN, 69718 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On japanese-iso-8bit-unix (=3D eucJP), =E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=
=E3=81=AF is 0xa4b3 0xa4ce 0xbcad 0xbdf1 0xa4cf,
and 0xa4b3 0xa4ce 0xbcad 0xbdf1 0xa4cf is illegal byte sequence on =
UTF-8.

On UTF-8 mode, macOS grep signals "grep: illegal byte sequence" error =
for the byte sequence,
but LANG=3DC mode or LANG is not specified, macOS grep accepts the byte =
sequence.
| % cd ~/emacs-29.2/leim/SKK-DIC
|=20
| % LANG=3Den_US.UTF-8 grep --color=3Dauto -nH --null -e `echo =
=E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF | iconv -f utf-8 -t eucJP` =
SKK-JISYO.L | iconv -f eucJP -t utf-8
| grep: illegal byte sequence
|=20
| % LANG=3DC           grep --color=3Dauto -nH --null -e `echo =
=E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF | iconv -f utf-8 -t eucJP` =
SKK-JISYO.L | iconv -f eucJP -t utf-8
| SKK-JISYO.L=0035:;; =E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF=E3=80=81=
SKK =E5=8E=9F=E4=BD=9C=E8=80=85=E3=81=AE=E4=BD=90=E8=97=A4=E9=9B=85=E5=BD=A6=
=E5=85=88=E7=94=9F=E3=81=8C=E3=80=81=E7=AC=AC 1 =
=E7=89=88=E4=BD=9C=E6=88=90=E3=81=AE=E3=81=9F=E3=82=81=E3=81=AB=E6=9D=B1=E5=
=8C=97=E5=A4=A7=E5=AD=A6
| =20
| % LANG=3D            grep --color=3Dauto -nH --null -e `echo =
=E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF | iconv -f utf-8 -t eucJP` =
SKK-JISYO.L | iconv -f eucJP -t utf-8
| SKK-JISYO.L=0035:;; =E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF=E3=80=81=
SKK =E5=8E=9F=E4=BD=9C=E8=80=85=E3=81=AE=E4=BD=90=E8=97=A4=E9=9B=85=E5=BD=A6=
=E5=85=88=E7=94=9F=E3=81=8C=E3=80=81=E7=AC=AC 1 =
=E7=89=88=E4=BD=9C=E6=88=90=E3=81=AE=E3=81=9F=E3=82=81=E3=81=AB=E6=9D=B1=E5=
=8C=97=E5=A4=A7=E5=AD=A6

emacs-29.1 executes /usr/bin/grep without LANG,
but emacs-29.2 seems to execute /usr/bin/grep with LANG=3Den_US.UTF-8.

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.

> 2024/03/11 22:15=E3=80=81Eli Zaretskii <eliz@HIDDEN>=E3=81=AE=E3=83=A1=E3=
=83=BC=E3=83=AB:
>=20
>> Cc: 69718 <at> debbugs.gnu.org
>> Date: Mon, 11 Mar 2024 14:50:31 +0200
>> From: Eli Zaretskii <eliz@HIDDEN>
>>=20
>> We made a change in msterm.m between Emacs 29.1 and Emacs 29.2, which
>                      ^^^^^^^^
> Sorry, that was supposed to be nsterm.m.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69718; Package emacs. Full text available.

Message received at 69718 <at> debbugs.gnu.org:


Received: (at 69718) by debbugs.gnu.org; 11 Mar 2024 13:16:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 11 09:16:42 2024
Received: from localhost ([127.0.0.1]:39225 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rjfWD-0000i3-Td
	for submit <at> debbugs.gnu.org; Mon, 11 Mar 2024 09:16:42 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40426)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rjfVy-0000hM-FV
 for 69718 <at> debbugs.gnu.org; Mon, 11 Mar 2024 09:16:41 -0400
Received: from fencepost.gnu.org ([209.51.188.10])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rjfVJ-0003FU-EY; Mon, 11 Mar 2024 09:15:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=TiWYVdOr7R/jHAitUTju2SQasiHQiNxt3TM2n0k7g+Q=; b=aBoGqHrJVB0m
 MGRI9EmOhLi+uLjYoLU1QmEreXuq71g9NbeTaSLzebevVMG/GcqR0qx3N8FOOVmvQet+4zqW8yU1l
 ijpNbLXkpIMYb6J3/CKec8BPgIQY10hyybXkPEXNunOnf6CMFmsZue+GQJ9M0lDV5xpjaNFJcYGrM
 o+TE813AiCfOQVz2E5Vpoml1kLEmRWK07FyDU+rzTU89gR29qHufwHXQ9a7+cf00zlcRPMbnnca9H
 qSmgkd0mDZg134JApDs7T0bihwQawvj8+SF1aG/vNGMIlt/gHEoLyRU8sMWejjBwxrkk85A17FO2u
 v+Ghar5t2nyfJG2GMEAwxA==;
Date: Mon, 11 Mar 2024 15:15:42 +0200
Message-Id: <86cys0vri9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: okshirai@HIDDEN
In-Reply-To: <86il1tue3s.fsf@HIDDEN> (message from Eli Zaretskii on Mon, 11
 Mar 2024 14:50:31 +0200)
Subject: Re: bug#69718: 29.2;
 grep japanese-iso-8bit-unix string fails with "grep: illegal byte
 sequence"
References: <8F538035-DB9D-4323-AD96-81647300C509@HIDDEN>
 <86il1tue3s.fsf@HIDDEN>
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 69718
Cc: 69718 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 69718 <at> debbugs.gnu.org
> Date: Mon, 11 Mar 2024 14:50:31 +0200
> From: Eli Zaretskii <eliz@HIDDEN>
> 
> We made a change in msterm.m between Emacs 29.1 and Emacs 29.2, which
                      ^^^^^^^^
Sorry, that was supposed to be nsterm.m.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69718; Package emacs. Full text available.

Message received at 69718 <at> debbugs.gnu.org:


Received: (at 69718) by debbugs.gnu.org; 11 Mar 2024 12:51:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 11 08:51:24 2024
Received: from localhost ([127.0.0.1]:39186 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rjf7j-0008TI-Pv
	for submit <at> debbugs.gnu.org; Mon, 11 Mar 2024 08:51:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52456)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rjf7f-0008T2-Qn
 for 69718 <at> debbugs.gnu.org; Mon, 11 Mar 2024 08:51:21 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1rjf72-00065Q-HO; Mon, 11 Mar 2024 08:50:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=xqquvQInKJFs8czQKiBTU1CVANQ84fAVg6u0YE+I5l0=; b=LqSBh58+TJmsu2sWP9d6
 /YeSQyzsEaLBOGSq9iJyKgz4gooaevwXKXZ/2fX1eOJzsPM1zAWdnS6suZzzr6B1IzTIvCKpnEedy
 +L4U+te2EtMAIHNGtM8J6f5nD8Ga81vdaqXNxIv67uxtSp/3BayucmPz2n1mrg9jp9hmx4erwXIaO
 HaOyBw3Fjd3M4cHbhQHYXv43lt8RNtE0hwNR2yRqw25mgoY1pnU1Dljloy/K6Y2t4XA//xi69851k
 JXt7xfnvGZFfn8xoUGCljTi5q1S4Xw9WPuZHMQiE0UH8a0ComXLlvOxzqfMtwFXKOhshpCMuzh8Np
 dQKkIsojtEVVAQ==;
Date: Mon, 11 Mar 2024 14:50:31 +0200
Message-Id: <86il1tue3s.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Akira Shirai <okshirai@HIDDEN>
In-Reply-To: <8F538035-DB9D-4323-AD96-81647300C509@HIDDEN> (message from
 Akira Shirai on Mon, 11 Mar 2024 08:45:33 +0900)
Subject: Re: bug#69718: 29.2;
 grep japanese-iso-8bit-unix string fails with "grep: illegal byte
 sequence"
References: <8F538035-DB9D-4323-AD96-81647300C509@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 69718
Cc: 69718 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: 白井彰 <okshirai@HIDDEN>
> From: Akira Shirai <okshirai@HIDDEN>
> 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#69718; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Mar 2024 23:48:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Mar 10 19:48:43 2024
Received: from localhost ([127.0.0.1]:38161 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rjSuI-0000gt-Jb
	for submit <at> debbugs.gnu.org; Sun, 10 Mar 2024 19:48:43 -0400
Received: from lists.gnu.org ([209.51.188.17]:38228)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <okshirai@HIDDEN>) id 1rjSuG-0000ge-TP
 for submit <at> debbugs.gnu.org; Sun, 10 Mar 2024 19:48:41 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <okshirai@HIDDEN>)
 id 1rjSrY-0007pM-OZ
 for bug-gnu-emacs@HIDDEN; Sun, 10 Mar 2024 19:45:52 -0400
Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <okshirai@HIDDEN>)
 id 1rjSrW-00037A-Pb
 for bug-gnu-emacs@HIDDEN; Sun, 10 Mar 2024 19:45:52 -0400
Received: by mail-pf1-x434.google.com with SMTP id
 d2e1a72fcca58-6e69655242cso209268b3a.3
 for <bug-gnu-emacs@HIDDEN>; Sun, 10 Mar 2024 16:45:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1710114347; x=1710719147; darn=gnu.org;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:from:to:cc:subject:date:message-id
 :reply-to; bh=1/puFM09fOb9ownMhZnN3mUfXWdcVLrSDfgMbBp/B5o=;
 b=X1vzSfeqXWQGzyeM7FwqtlK8nLigYvukfYSPsWiydlDRJKCcPPj18qIUkGgEN+HZCb
 dZogMhYx6f2CmhYf8UVmEKzSyfoi/coNH2DWVYNmRXryPuwOVV43FA+/6Wm8GCLN6WHg
 mT+TpJ2YoqmQar4MiPuEOnQQ0GO2BB6OkfiEExaSvkrjkB39AGWvx6psEWzZ2N1krF1G
 GFr0jriUcdpE89FM+F++EAabeJIecXCX2TK0ejTD4KUSI2baol1ntfIvU/cGT56trCaP
 DGBXJd2w94g87UwoYD7pUWfm3Dp5iyJqaiyUAe+WaCqp1ZPGWTy8DPKUyzM7H/9QX4FJ
 AOcw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1710114347; x=1710719147;
 h=to:cc:date:message-id:subject:mime-version
 :content-transfer-encoding:from:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=1/puFM09fOb9ownMhZnN3mUfXWdcVLrSDfgMbBp/B5o=;
 b=mL5DoXzW23ivZDgYrKJoUuvellB5IPQdttNl4GTFpnVfZfPrPg2zoUDVhSVOOIZYEQ
 rPJn0VJ+ocC/CBPbVlKh3N0eYvup3aFM7XxQjr+bRRMXv+8S6st1eP9rSWN/NQq62ELk
 TuVtL9ssR4AqCWPVFpVqXN7uJ8yXsaVHuwUhZmRXB4WPA1pBUgEkhF7kPFmm+PpvDh0u
 NMBN7C/C+iBlmb0YS0OxMcoMqTPTbPW3DEphruUBOvtVNPGKa6l7eZ9CLyrg5+Ja0H9H
 QG1LS3kxpqW7hpedxpvDTmd+c18MS07ulRdTc+TliBa1hBx5aJZus4bZo8H8ebPmuwdc
 rzhw==
X-Gm-Message-State: AOJu0YwLV88KoEk5zRAztjliBN6t4hL+xIXoetL0Ie9QfnDjoRiC9IUL
 YBnPnXoJWrUvDajfo7b9aIb3I9n9LdaliPc1wNUKg1W8vZeARBL8VlkrsJyD
X-Google-Smtp-Source: AGHT+IE1zSPj6gqxlA1kIjOxo0PFSqSMji+cxrtvFyX8LK/gTXMESvR9mpFCNt5jMX8CrB/rh5kvuQ==
X-Received: by 2002:a05:6a20:7343:b0:1a1:4cba:7f38 with SMTP id
 v3-20020a056a20734300b001a14cba7f38mr7588144pzc.9.1710114346766; 
 Sun, 10 Mar 2024 16:45:46 -0700 (PDT)
Received: from smtpclient.apple
 (p4512251-ipxg23101hodogaya.kanagawa.ocn.ne.jp. [153.205.36.251])
 by smtp.gmail.com with ESMTPSA id
 i185-20020a62c1c2000000b006e612df4627sm3221689pfg.39.2024.03.10.16.45.45
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Sun, 10 Mar 2024 16:45:46 -0700 (PDT)
From: Akira Shirai <okshirai@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\))
Subject: 29.2; grep japanese-iso-8bit-unix string fails with "grep: illegal
 byte sequence"
Message-Id: <8F538035-DB9D-4323-AD96-81647300C509@HIDDEN>
Date: Mon, 11 Mar 2024 08:45:33 +0900
To: bug-gnu-emacs@HIDDEN
X-Mailer: Apple Mail (2.3774.400.31)
Received-SPF: pass client-ip=2607:f8b0:4864:20::434;
 envelope-from=okshirai@HIDDEN; helo=mail-pf1-x434.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: =?utf-8?B?55m95LqV5b2w?= <okshirai@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

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=3Dauto -nH =
--null -e =E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF SKK-JISYO.L" as =
the command-args
  =3D> 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=3DC grep --color=3Dauto -nH --null -e =
=E3=81=93=E3=81=AE=E8=BE=9E=E6=9B=B8=E3=81=AF SKK-JISYO.L", the grep =
runs successfully.



In GNU Emacs 29.2 (build 1, x86_64-apple-darwin23.3.0, NS appkit-2487.40
 Version 14.3 (Build 23D56)) of 2024-01-25 built on F9A6231BCF26.local
Windowing system distributor 'Apple', version 10.3.2487
System Description:  macOS 14.3.1

Configured using:
 'configure --with-ns --without-x --without-compress-install
 --with-gnutls=3Dno'

Configured features:
ACL LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER SQLITE3 THREADS
TOOLKIT_SCROLL_BARS ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  buffer-read-only: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny rfc822
mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils face-remap help-mode shell pcomplete thingatpt files-x grep
compile text-property-search comint ansi-osc ansi-color ring dired-aux
dired dired-loaddefs japan-util time-date subr-x cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 58569 6787)
 (symbols 48 6316 0)
 (strings 32 18079 1823)
 (string-bytes 1 543082)
 (vectors 16 14244)
 (vector-slots 8 280500 7109)
 (floats 8 26 33)
 (intervals 56 785 0)
 (buffers 976 16))





Acknowledgement sent to Akira Shirai <okshirai@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#69718; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 13 Mar 2024 14:15:02 UTC

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