all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Akira Shirai <okshirai@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: okshirai@joy.ocn.ne.jp, 69718@debbugs.gnu.org
Subject: bug#69718: 29.2; grep japanese-iso-8bit-unix string fails with "grep: illegal byte sequence"
Date: Wed, 13 Mar 2024 00:42:22 +0900	[thread overview]
Message-ID: <219184D7-3818-47AA-9722-BD4BCE85C0A0@gmail.com> (raw)
In-Reply-To: <86cys0vri9.fsf@gnu.org>

On japanese-iso-8bit-unix (= eucJP), この辞書は 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=C mode or LANG is not specified, macOS grep accepts the byte sequence.
| % cd ~/emacs-29.2/leim/SKK-DIC
| 
| % LANG=en_US.UTF-8 grep --color=auto -nH --null -e `echo この辞書は | iconv -f utf-8 -t eucJP` SKK-JISYO.L | iconv -f eucJP -t utf-8
| grep: illegal byte sequence
| 
| % LANG=C           grep --color=auto -nH --null -e `echo この辞書は | iconv -f utf-8 -t eucJP` SKK-JISYO.L | iconv -f eucJP -t utf-8
| SKK-JISYO.L\035:;; この辞書は、SKK 原作者の佐藤雅彦先生が、第 1 版作成のために東北大学
|  
| % LANG=            grep --color=auto -nH --null -e `echo この辞書は | iconv -f utf-8 -t eucJP` SKK-JISYO.L | iconv -f eucJP -t utf-8
| SKK-JISYO.L\035:;; この辞書は、SKK 原作者の佐藤雅彦先生が、第 1 版作成のために東北大学

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.

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、Eli Zaretskii <eliz@gnu.org>のメール:
> 
>> Cc: 69718@debbugs.gnu.org
>> Date: Mon, 11 Mar 2024 14:50:31 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>> 
>> We made a change in msterm.m between Emacs 29.1 and Emacs 29.2, which
>                      ^^^^^^^^
> Sorry, that was supposed to be nsterm.m.






  reply	other threads:[~2024-03-12 15:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-10 23:45 bug#69718: 29.2; grep japanese-iso-8bit-unix string fails with "grep: illegal byte sequence" Akira Shirai
2024-03-11 12:50 ` Eli Zaretskii
2024-03-11 13:15   ` Eli Zaretskii
2024-03-12 15:42     ` Akira Shirai [this message]
2024-03-12 19:39       ` Eli Zaretskii
2024-03-13 14:07         ` Akira Shirai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=219184D7-3818-47AA-9722-BD4BCE85C0A0@gmail.com \
    --to=okshirai@gmail.com \
    --cc=69718@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=okshirai@joy.ocn.ne.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.