From: Herbert Xu <herbert@gondor.apana.org.au>
To: Harald van Dijk <harald@gigawatt.nl>
Cc: Christoph Anton Mitterer <calestyo@scientia.org>,
DASH Mailing List <dash@vger.kernel.org>
Subject: Re: [PATCH 0/8] Add multi-byte support
Date: Mon, 29 Apr 2024 21:12:44 +0800 [thread overview]
Message-ID: <Zi+czPiT/X/GbNm1@gondor.apana.org.au> (raw)
In-Reply-To: <abc8daf0-60ab-4e7c-aba7-9a3f3b973f57@gigawatt.nl>
On Sun, Apr 28, 2024 at 03:50:57PM +0100, Harald van Dijk wrote:
>
> The way you are implementing it, once you get to pmatch(), arguably you will
> not handle ${foo%.} correctly.
I took the easy way out so for now only the fnmatch path works
properly. But eventually I will get to the pmatch path too,
especially because fnmatch(3) seems to slow down quite a bit
once locale is set.
> This is something I expect to set foo to '\303', and it does in all shells I
> know of, despite POSIX not saying this needs to work. The way you are
> implementing multibyte character support, if I am reading it right, as long
> as a full multibyte character has not been read, the next byte will be taken
> as part of that multibyte character, meaning you will take '\303.' as a
> single invalid multibyte character.
A multi-byte character has to be valid according to mbrtowc
before I mark it with MBCHAR. Otherwise it'll be treated as
just a single-byte character.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2024-04-29 13:12 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-27 11:03 [PATCH 0/8] Add multi-byte support Herbert Xu
2024-04-16 10:03 ` [PATCH 1/8] shell: Call setlocale Herbert Xu
2024-04-16 10:38 ` [PATCH 2/8] shell: Use strcoll instead of strcmp where applicable Herbert Xu
2024-04-16 23:13 ` [PATCH 3/8] expand: Count multi-byte characters for VSLENGTH Herbert Xu
2024-04-18 8:59 ` [PATCH 4/8] expand: Process multi-byte characters in subevalvar Herbert Xu
2024-04-20 13:46 ` [PATCH 5/8] expand: Process multi-byte characters in expmeta Herbert Xu
2024-04-23 11:17 ` [PATCH 6/8] expand: Support multi-byte characters during field splitting Herbert Xu
2024-04-27 8:15 ` [PATCH 7/8] input: Allow MB_LEN_MAX calls to pungetc Herbert Xu
2024-04-27 8:41 ` [PATCH 8/8] parser: Add support for multi-byte characters Herbert Xu
2024-04-27 21:31 ` [PATCH 0/8] Add multi-byte support Christoph Anton Mitterer
2024-04-28 0:49 ` Herbert Xu
2024-04-28 1:19 ` Christoph Anton Mitterer
2024-04-28 1:35 ` Lawrence Velázquez
2024-04-28 1:50 ` Christoph Anton Mitterer
2024-04-28 2:03 ` Christoph Anton Mitterer
2024-04-28 14:50 ` Harald van Dijk
2024-04-29 13:12 ` Herbert Xu [this message]
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=Zi+czPiT/X/GbNm1@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=calestyo@scientia.org \
--cc=dash@vger.kernel.org \
--cc=harald@gigawatt.nl \
/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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).