You are not logged in.

#26 2017-08-04 13:21:57

seth
Member
Registered: 2012-09-03
Posts: 51,348

Re: Messed up UTF-8 characters

@loqs, WARNING this is a bashim. Even on zsh it'll just take a while (a dozen seconds? no idea what happened ;-) and not unset the variable

For another bashism (doesn't work on zsh either):

for LCV in `printenv | sed '/^LC_/!d; s/=.*//g'`; do [ -z ${!LCV} ] && unset $LCV; done

Edit, zshism:

for LCV in `printenv | sed '/^LC_/!d; s/=.*//g'`; do [ -z ${(P)LCV} ] && unset $LCV; done

Editedit, bazshism (if we buy into non-posix anyway ...)

for LCV in `printenv | grep -E '^LC_'`; do [ -z ${LCV#*=} ] && unset ${LCV%=*}; done

@ugjka
"For now" - if it ever hits reddit, it'll soon be NOTABUG :-P

Last edited by seth (2017-08-04 13:27:44)

Offline

#27 2017-08-04 14:56:53

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Messed up UTF-8 characters

Ok, I missed that it was in post #9.

In my locale.conf I set/override all variables with the exact configuration I want, because I want LANG to be en_US.UTF-8 but I want some of the LC_ variables to be set to another locale. Maybe that is why I have not stumbled upon any possible bugs with systemd.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB