From: Stephane Chazelas <stephane@chazelas.org>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [bug] $scalar[(pws[\0])1] or $scalar[(pws[á])1] doesn't work
Date: Fri, 18 Nov 2022 12:25:13 +0000 [thread overview]
Message-ID: <20221118122513.zpyycel7qkxjf6sz@chazelas.org> (raw)
In-Reply-To: <20221113081452.bk7zdnbc6qvqjxef@chazelas.org>
2022-11-13 08:14:52 +0000, Stephane Chazelas:
[...]
> $ a=$'foo\0bar'
> $ echo $a[(pws[\0])1]
> f
>
> Expected "foo".
>
> It seems that's some missing metafication as confirmed by:
[...]
It seems the problems are not limited to the s subscript flag.
$ ltrace -e getpwnam zsh -c "u=$'st\u00e9ph\u00e1ne'; echo *(u:\$u:)"
zsh->getpwnam("st\303\251ph\303\203\201ne") = 0
zsh:1: unknown username 'stépháne'
+++ exited (status 1) +++
See \241 changed to \203\201 in the call to getpwnam().
The error message has the correct name though.
--
Stephane
next prev parent reply other threads:[~2022-11-18 12:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-13 8:14 Stephane Chazelas
2022-11-18 12:25 ` Stephane Chazelas [this message]
2022-11-28 15:50 ` Jun. T
2022-11-28 23:57 ` Jun T
2022-11-28 15:47 ` Jun. T
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=20221118122513.zpyycel7qkxjf6sz@chazelas.org \
--to=stephane@chazelas.org \
--cc=zsh-workers@zsh.org \
/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 public inbox
https://git.vuxu.org/mirror/zsh/
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).