You are not logged in.
Hi, I've found some threads here where the problem is described that Nautilus and ls (that use the locale settings) sort files case sensitive but the solutions I found seem to be out dated: https://bbs.archlinux.org/viewtopic.php?id=34699
Now, what's the correct way to avoid this behavoir?
$ locale -a
C
POSIX
de_DE
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
de_DE@euro
deutsch
german
$ grep LOCALE /etc/rc.conf
LOCALE="de_DE.utf8"
DAEMON_LOCALE="yes"
$ locale
LANG=C
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
Last edited by thms (2012-04-03 18:46:31)
Offline
I'm no expert, but I doubt 'C' is supposed to be your locale. My output:
$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
One possible cause: if you have an /etc/locale.conf, the LANG variable in that file overrides LOCALE in rc.conf. Otherwise, you could just set LC_COLLATE in your profile and export it.
Last edited by alphaniner (2012-03-27 16:05:39)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Thanks for your reply but there's no such file
$ ls /etc/ | grep locale
locale.gen
Last edited by thms (2012-03-27 16:05:29)
Offline
Maybe check your .bash_profile and .bashrc (or equivalent) to ensure you haven't exported LANG from one of them.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
LC_COLLATE is responsible for sorting.
LC_COLLATE="C" prints 'Foo' before 'bar', because 'Foo' starts with a capital letter.
export LC_COLLATE="en_US.UTF-8"
shoudl fix this.
(you can use German locale instead of en_US if you like)
Last edited by karol (2012-03-27 16:24:20)
Offline
That was pointed out in the thread he linked in the OP. I think the important issue is why the output of locale says LANG="C" when he has LOCALE="de_DE.utf8" in his rc.conf.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Not sure what you mean
[karol@black foo4]$ export LC_COLLATE="C"
[karol@black foo4]$ ls
Foo bar
[karol@black foo4]$ export LANG="C"
[karol@black foo4]$ ls
Foo bar
[karol@black foo4]$ export LC_COLLATE="en_US.UTF-8"
[karol@black foo4]$ ls
bar Foo
Offline
Thanks, I put
export LC_COLLATE="de_DE.utf8"
in /etc/profile and now sorting works like I want to. Contrary to the linked thread there was no entry for LC_COLLATE in this file.
So, there's still the question, that alphaniner points to: why is my locale setting in /etc/rc.conf ignored?
Offline
@karol
I don't mean to argue that LC_COLLATE="C" is not the cause. But why is it - and everything else in his locale output - C?
Last edited by alphaniner (2012-03-27 16:31:03)
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
@karol
I don't mean to argue that LC_COLLATE="C" is not the cause. But why is it - and everything else in his locale output - C?
Ah, sure, https://bbs.archlinux.org/viewtopic.php … 6#p1078506 is still left unanswered.
Offline
Sorry,
$ cat .bashrc
# Check for an interactive session
[ -z "$PS1" ] && return
alias ls='ls --color=auto'
#PS1='[\u@\h \W]\$ '
PS1="\[\u: \w\n\$ "
#tab-completionwit sudo
complete -cf sudo
#aliase
alias cp="cp -iv"
alias mv="mv -iv"
alias rm="rm -iv"
alias aur="yaourt -Su --aur"
alias Syu="yaourt -Syu"
alias Su='su -l'
$ cat .bash_profile
. $HOME/.bashrc
#autologin
if [[ -z $DISPLAY && $(tty) = /dev/tty1 ]]; then
exec startx
# Could use xinit instead of startx
#exec xinit -- /usr/bin/X -nolisten tcp
fi
Offline
Just want to bump this thread also the actual problem with Nautilus is solved. It's still unclear why my entry in /etc/rc.conf is ignored.
Offline
Have you enabled your locale in /etc/locale.gen and run locale-gen according to this wiki page?
Offline
Yes, I did but the output of locale alqays looks like in my first post.
Offline
Maybe a change of title is in order: "LOCALE setting in rc.conf is ignored/overruled" or some such.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Done, thanks
For a workaround do I have to put every single line into /etc/profile or is there a one liner?
export LC_COLLATE="de_DE.utf8"
export LC_TIME="de_DE.utf8"
export LC_COLLATE="de_DE.utf8"
.
.
.
Offline
as mentioned above, /etc/locale.conf overrides locale settings in rc.conf. You may use it as a workaround.
Also, as a longshot, try to change the LOCALE variable in rc.conf to match the string in /etc/locale.gen, not the one printed out by locale -a. I have it this way and it works just fine.
What happened to Arch's KISS? systemd sure is stupid but I must have missed the simple part ...
... and who is general Failure and why is he reading my harddisk?
Offline
I've found the LOCALE variable in /etc/rc.conf should exactly match the spelling that is included in locale.gen. Otherwise, strange problems may occur.
I'm away from my Arch box, but I think locale.gen's spelling is "de_DE.UTF-8". Somebody please check this. If I'm correct, the line in rc.conf should be:
LOCALE="de_DE.UTF-8"
Offline
I've found the LOCALE variable in /etc/rc.conf should exactly match the spelling that is included in locale.gen. Otherwise, strange problems may occur.
I'm away from my Arch box, but I think locale.gen's spelling is "de_DE.UTF-8". Somebody please check this. If I'm correct, the line in rc.conf should be:
LOCALE="de_DE.UTF-8"
That didn't change anything. The same applys to LANG=de_DE.UTF-8 in /etc/locale.conf
I now have
export LANG=de_DE.UTF-8
in my .bashrc and this works. Still wondering about the ignored setting.
/edit: Now k3b doesn't show umlauts correctly
Last edited by thms (2012-04-04 15:37:06)
Offline
Ok, a new information: In the language settings of gnome and encoding settings in gnome-terminal the default language is always set to ansi_x3.4-1968
What is that?
When I try to add German it is set back when I go back to language settings. English is there, though but can't be chosen.
Last edited by thms (2012-04-04 15:56:46)
Offline
Did you try to delete your locale.sh in /etc/profile.d/ and then reinstall initscripts?? If not then try. This solved a very similar Issue for me.
btw thisoldman was right, the correct spelling is "de_DE.UTF-8".
Offline
Did you try to delete your locale.sh in /etc/profile.d/ and then reinstall initscripts?? If not then try. This solved a very similar Issue for me.
btw thisoldman was right, the correct spelling is "de_DE.UTF-8".
thx
the arch beginner's guide only says:
rm /etc/profile.d/locale.sh
without any explanation
i had the same problem (missing locale.sh) like thms but your information about reinstalling initscripts solved everything!
Last edited by dontbugme (2012-04-26 23:59:26)
Offline
the arch beginner's guide only says:
rm /etc/profile.d/locale.sh
without any explanation
i had the same problem (missing locale.sh) like thms but your information about reinstalling initscripts solved everything!
yes, thats exactly the problem I had: I deleted locale.sh without reinstalling. . I had also missunderstood the wiki. Good that I'm not the only one - already blamed me for being that stupid
Anyway, I hope this helps thms.
EDIT: I updated the wiki
Last edited by nuc (2012-04-27 14:31:03)
Offline