From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12881 invoked from network); 15 Dec 2022 12:38:15 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 15 Dec 2022 12:38:15 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1671107895; b=CEUhdLeYS7cIr4hxTmNkGTXQHjElMjrRE2nLhafTSM/w//CIXMRSF50Pgqm+rnNoHeEmeCUOww tt3h2ET2eCXkRlio05HyCMILAFCrmW02rtKbQFPoHx68nXi8jJdCd6rPC1h3rWJ+ZorDSs9+0j hVTEum62zVAvRfeiYTprF4mtJTmUulaHPP74HYbNP+E8JONXcpd/coMCTt32Surid4j5AMIzoM pcNDHIhANHfE9xNkEU8RDE8pWmB/YTMPASVIgNIu1Xeu2BPn0vCuYFXw0HxzGqHYC8rg/571rz IzQOQoknyqdu/Amn9gSIxQX5LHen2wGhxsEtg4pBvH183A==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (snd01002-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.18; dmarc=none header.from=kba.biglobe.ne.jp; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1671107895; bh=Fb42mWxjPuFGAw3xgiXVuXcUnmg19oUW/YGL04ci6EE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Message-ID:In-Reply-To:To:References:Date:Subject: MIME-Version:Content-Transfer-Encoding:Content-Type:From:DKIM-Signature; b=PuoYLsWl+CNImgL0btRMTgxZEnZOaE1tf+Q9InpUP3l+K6OtI7vRbrjhalvdVMDPFlcn5kwiyH kS9iXOV88AyffnzlaQ1C43yZNXQGU9+QiJJkUIbvpZCISJaZfr8WLoEiiettLhB1EftcAtv2YV 2NE8LLf9xVChIHi5+ruCz6c8BeXrK7Uba/8YQ0sn6k594rTINqYdMJ9vjedC7sCs/MK3zQWj2t jbYTBe9ufXlqL/0mCb2KLPGRTgQUOi/Rl/tv64d/GesZIKelc8JTKemiNpNxXa+VXPNVt7QS/q re37H46gDyY6XnrbYbqbQkHm4tjKC4kfQL5Mv6wJxV2Bcg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-Id:In-Reply-To:To:References: Date:Subject:Mime-Version:Content-Transfer-Encoding:Content-Type:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=KuiaEfIDrcWCO0wIDM1qdjee72aY4yQCzHxXQPas8EY=; b=Q6eu1tstkgnl5b0+SZKMhifJaq 1SChcXtEpGYT5f58pGKucLSmctjYIrHz+wOnVsEkRzoCWyqqEh8RluBoXbiem1BZCYNDkYZP5GHW5 uyZkIpqJeUIOymxULo/Kia4hso0+2+Z0boLm1GrzzKPcAE+qCxcymf0c+MxLzWvFPseM1nPwMs39O 5LLZlhtb5S/Fy3GmsBmPqTVw01OX2YakqNN5f+OW1czIYDPCb0uF+YpwFSr6roDx/6NuPm7jqekSu BcNYk2GcnsKb3RfQEWjw4QSvu0Dpg3pjbwED2bVrrokdNPHEQlvFM10dBi7oXifHW+pwU8hKRGk4U 0eWcgEBQ==; Received: by zero.zsh.org with local id 1p5nV8-000LNw-Oa; Thu, 15 Dec 2022 12:38:14 +0000 Authentication-Results: zsh.org; iprev=pass (snd01002-bg.im.kddi.ne.jp) smtp.remote-ip=27.86.113.18; dmarc=none header.from=kba.biglobe.ne.jp; arc=none Received: from snd01002-bg.im.kddi.ne.jp ([27.86.113.18]:36673 helo=dfmta1008.biglobe.ne.jp) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1p5nUp-000L6T-FM; Thu, 15 Dec 2022 12:37:57 +0000 Received: from mail.biglobe.ne.jp by omta1008.biglobe.ne.jp with ESMTP id <20221215123748298.WMDB.4048.mail.biglobe.ne.jp@biglobe.ne.jp> for ; Thu, 15 Dec 2022 21:37:48 +0900 From: "Jun. T" Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: read -d $'\200' doesn't work with set +o multibyte (and [PATCH]) Date: Thu, 15 Dec 2022 21:37:46 +0900 References: <20221209154225.2z3lbtf422ypnmjx@chazelas.org> <99492-1670616302.663548@1brw.o7tP.wgJL> <20221210090626.mkv7bxeqnap6awah@chazelas.org> <1FF79E35-0103-4B80-BA4A-ECC6FD2ADF7E@kba.biglobe.ne.jp> <46661-1671054174.401235@OHsn.sB58.XThR> To: zsh-workers@zsh.org In-Reply-To: <46661-1671054174.401235@OHsn.sB58.XThR> Message-Id: X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Biglobe-Sender: takimoto-j@kba.biglobe.ne.jp X-Seq: 51218 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: > 2022/12/15 6:42, Oliver Kiddle wrote: >=20 > At least in my testing, it appears to also work to define delim as > unsigned char which I would find less confusing. I used int since delim is always compared with 'c' (=3Dint). But of course it's OK to use unsigned char. >> +0:read with a delimeter >=3D 0x80 >=20 > There's a typo in "delimiter" Thanks. # I was thinking 'delimeter' was the _correct_ spelling ;) > The patch below needs to be applied on top of your patch. Could you push all the patch? But: > It adds a few > more test cases, (snip) > additional problem I was hitting when trying to reproduce the original > problem. ... Sorry, I missed your first post, and I din't considered the real problem with multibyte locale. > --- a/Test/B04read.ztst > +++ b/Test/B04read.ztst (snip) > + read -ed $'\xc2' > +0:read delimited by a single byte terminates if the byte is part of a = multibyte character > + +>one Is this really what the standard requires (or will require)? Breaking in the middle of a valid multibyte character looks rather odd to me.=