Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: The q parameter expansion flag does not support Unicode



On 2026-07-12 19:55:55 +0100, Stephane Chazelas wrote:
> Same for my first name with the é in decomposed form (e followed by
> combining acute accent):
> 
> $ var=$'Ste\u301phane'
> $ print -r - ${(q)var}
> Stéphane
> $ echo Ste<0301>phane # after TAB
> $ echo ${(m)#var[4]}
> 0
> 
> Having Ste$'\314'$'\201'phane here would make it a lot less readable.

Correctness in various contexts is also important. There should be a
quoting mechanism that is safe for commands/scripts put on web pages
or e-mail messages, or copy-pastable from text terminals. Zero-width
characters are not guaranteed to be preserved.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)




Messages sorted by: Reverse Date, Date, Thread, Author