help / color / mirror / code / Atom feed
From: "Jun. T" <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: read -d $'\200' doesn't work with set +o multibyte (and [PATCH])
Date: Thu, 15 Dec 2022 21:37:46 +0900	[thread overview]
Message-ID: <C63F0FA2-1730-40DB-9C12-28FECE3EC406@kba.biglobe.ne.jp> (raw)
In-Reply-To: <46661-1671054174.401235@OHsn.sB58.XThR>

> 2022/12/15 6:42, Oliver Kiddle <opk@zsh.org> wrote:
> 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' (=int).
But of course it's OK to use unsigned char.

>> +0:read with a delimeter >= 0x80

> There's a typo in "delimiter"

# 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?

> It adds a few
> more test cases,
> 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
> +  read -ed $'\xc2'
> +0:read delimited by a single byte terminates if the byte is part of a multibyte character
> +<one£two
> +>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.

  reply	other threads:[~2022-12-15 12:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09 15:42 read -d $'\200' doesn't work with set +o multibyte Stephane Chazelas
2022-12-09 20:05 ` Oliver Kiddle
2022-12-10  9:06   ` read -d $'\200' doesn't work with set +o multibyte (and [PATCH]) Stephane Chazelas
2022-12-13 11:12     ` Jun T
2022-12-14 21:42       ` Oliver Kiddle
2022-12-15 12:37         ` Jun. T [this message]
2022-12-16  8:29           ` Oliver Kiddle
2022-12-18 10:51             ` Jun. T
2022-12-18 17:58               ` Stephane Chazelas
2022-12-15  2:01     ` Oliver Kiddle

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:

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

  git send-email \
    --in-reply-to=C63F0FA2-1730-40DB-9C12-28FECE3EC406@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \


* 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 public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).