On Sun, 2020-05-03 at 06:43 +0200, Roman Perepelitsa wrote: > On Sun, May 3, 2020 at 2:07 AM Daniel Shahaf 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: > > 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" > ) Something like the attached? Slightly but not extensively tested, so I could easily have missed something. pws