You are not logged in.
Pages: 1
Hi,
Under Slitaz 4, I just edited /etc/profile so that it exports all variables sourced from locale.conf:
line 38 is changed from
export LANG LC_ALL
to
export LANG ${!LC_@}
This allows fine-tuning of locale, such as
LC_CTYPE=fr_FR.UTF-8
LC_NUMERIC=C
LC_COLLATE=C
for example.
I hope you'll find this patch worth applying.
Offline
Sorry, no.
${!LC_@} not works in my default shell.
[c]/bin/sh: syntax error: bad substitution[/c]
Do I need Bash? Really, no. And our default SliTaz ISO have no Bash too.
Maybe you know other way to do the same? Good as idea.
Offline
Sorry, I thought bash behaved like sh when invoked as sh. (Or maybe the default Slitaz sh isn't fully sh compliant? Whatever.)
Another way is:
export LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
export LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL
Tedious but should work 
Offline
(Or maybe the default Slitaz sh isn't fully sh compliant? Whatever.)
Interesting document about our shell: man ash.
Tedious but should work
Let's test, what will be if I not set some LC_* variable, and don't want to see it.
Test.
1. Variable NONSET not exist:
[c]export NONSET
env | grep NONSET[/c]
(empty)
2. Existing variable ISSET:
[c]ISSET=isset
export ISSET
env | grep ISSET
ISSET=isset[/c]
OK, it worked as expected. Only LC_* variables that sourced from /etc/locale.conf will be exported.
Offline
Pages: 1
[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]