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

Re: Feature request: ZSH_XTRACEFD variable



Roman Perepelitsa wrote on Sun, 03 May 2020 06:43 +0200:
> On Sun, May 3, 2020 at 2:07 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > I would have expected the unsetfn to be called for any special parameter.  
> 
> I've bumped into a similar issue with LC_* parameters. Here are a
> couple of test cases:
> 

LC_ALL's unsetfn is stdunsetfn(), so even if unsetfn were called,
I don't think the locale would be restored.

Agree it's a bug, though.

Anyone interested in writing the patch, or a regression test?

Cheers,

Daniel



> 1.
> 
>   (
>     unset -m 'LC_*|LANG'
>     export LC_CTYPE='en_US.UTF-8'  # set this to any UTF-8 locale you have
>     echo '\u276F'  # this works
>     () {
>       local LC_ALL=C
>     }  
>     echo '\u276F'  # this doesn't work
>   )
> 
> 2.
> 
>   (
>     unset -m 'LC_*|LANG'
>     LC_COLLATE=en_US.UTF-8
>     x=(-a --b)
>     print -r -- ${(on)x}  # this prints "-a --b"
>     () {
>       local LC_ALL= LC_COLLATE=C
>       print -r -- ${(on)x}
>     }  
>     print -r -- ${(on)x}  # this prints "--b -a"
>   )
> 
> Roman.



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