Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [bug] $scalar[(pws[\0])1] or $scalar[(pws[á])1] doesn't work
- X-seq: zsh-workers 50990
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [bug] $scalar[(pws[\0])1] or $scalar[(pws[á])1] doesn't work
- Date: Fri, 18 Nov 2022 12:25:13 +0000
- Archived-at: <https://zsh.org/workers/50990>
- In-reply-to: <20221113081452.bk7zdnbc6qvqjxef@chazelas.org>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
- References: <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author