i’ve been strugling with my system to get it utf-8′ed . The solution was easy and in a few minutes i’ve repaired the wrong i made previously.
Every now and then, if i tried to emerge a ebuild, some warnings like:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "pt_PT.UTF-8@euro",
LC_ALL = "pt_PT.UTF-8@euro",
LANG = "pt_PT.UTF-8@euro"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
if i did a # locale -a someting like this would show:
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
pt_PT
pt_PT.euroutf8
pt_PT@euro
pt_PT@euro.UTF-8
After some googling, i’ve found out that -euro with uft-8 is redudant. So i generated the locale i wanted:
# localedef -c -i pt_PT -f UTF-8 pt_PT.UTF-8
and made sure that ~/.bashrc and /etc/env.d/02locale had the correct locales:
# cat /etc/env.d/02locale
LANG=pt_PT.UTF-8
LC_ALL=pt_PT.UTF-8
# tail -4 ~/.bashrc
export LANG="pt_PT@euro"
export LANGUAGE="pt_PT@euro"
export LC_ALL="pt_PT@euro"
so, to commit the changes do (in gentoo):
# env-update
and
source /etc/profile
And all be roses again. i hope..
just to be really sure that all is working again, i did a # perl -v and no errors showed up!
EDIT: To make sure, try $ locale charmap or for the full listing: $ locale
Thanks you. With your instructions I could solve the perl error messages into the shell of Mandriva distribution.
Problem Solved
Thanks
Comment by Toci — May 27, 2011 @ 8:49 am