You are not logged in.

#1 2012-04-20 20:50:00

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

perl and locale problem

hi,

i have that problem: when launch mimeopen (perl application) i get this warning

[mattia@arch-desktop ~]$ mimeopen /tmp/test.txt 
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "it_IT.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

any ideas on how solve it ?

thanks


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#2 2012-04-20 20:57:27

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: perl and locale problem

also with other program i get similar behaviour:

[mattia@arch-desktop ~]$ man tilda 
man: can't set the locale; make sure $LC_* and $LANG are correct
.....
[mattia@arch-desktop ~]$ tilda --help

(process:4713): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.

+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#3 2012-04-21 00:08:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: perl and locale problem

Please post the output of 'locale' and 'locale -a'.
You might need to set LC_ALL.

Offline

#4 2012-04-21 07:47:33

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: perl and locale problem

these are the outputs:

[mattia@arch-desktop ~]$ locale
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_ALL to default locale: No such file or directory
LANG=it_IT.utf8
LC_CTYPE="it_IT.utf8"
LC_NUMERIC="it_IT.utf8"
LC_TIME="it_IT.utf8"
LC_COLLATE="it_IT.utf8"
LC_MONETARY="it_IT.utf8"
LC_MESSAGES="it_IT.utf8"
LC_PAPER="it_IT.utf8"
LC_NAME="it_IT.utf8"
LC_ADDRESS="it_IT.utf8"
LC_TELEPHONE="it_IT.utf8"
LC_MEASUREMENT="it_IT.utf8"
LC_IDENTIFICATION="it_IT.utf8"
LC_ALL=
[mattia@arch-desktop ~]$ locale -a
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
en_GB.utf8

Last edited by nTia89 (2012-04-21 07:48:25)


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#5 2012-04-21 14:32:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: perl and locale problem

Uncomment the correct locale in /etc/locale.gen and run 'locale-gen' or switch to en_GB.utf8, which you have already uncommented.

Offline

#6 2012-04-21 15:00:16

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: perl and locale problem

what do you mean with "correct locale" ???

does it is a user settings ???

further info:
i have installed arch with it locale, then i switch to en_GB, should be this the problem ???


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#7 2012-04-21 15:32:33

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: perl and locale problem

You simply uncomment any locale you which to be using on your system in /etc/locale.gen and run "locale-gen" afterwards as karol mentioned.

Which locale have you set in /etc/rc.conf btw?


Burninate!

Offline

#8 2012-04-21 15:40:17

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: perl and locale problem

HARDWARECLOCK="UTC"
TIMEZONE="Europe/Rome"
KEYMAP="it"
CONSOLEFONT=
CONSOLEMAP=
LOCALE="en_GB.UTF-8"
DAEMON_LOCALE="yes"
USECOLOR="yes"

+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#9 2012-04-23 13:18:01

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: perl and locale problem

Have you fixed this issue?

Offline

#10 2012-04-23 13:25:35

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: perl and locale problem

no, the issue could be related due to recently locale change ???
infact i've installed arch years ago with it_IT and recently i decided to switch to en_GB for the language and it for the keyboard layout.

i've already executed locale-gen but the problem persist ....

my rc.conf is up


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#11 2012-04-23 13:43:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: perl and locale problem

nTia89 wrote:

no, the issue could be related due to recently locale change ???

I don't think so.

nTia89 wrote:

infact i've installed arch years ago with it_IT and recently i decided to switch to en_GB for the language and it for the keyboard layout.

Are you exporting any locale settings in your .bashrc?
Please post the output of 'locale' and 'locale -a'.

Offline

#12 2012-04-23 14:20:08

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: perl and locale problem

same as before:

[mattia@arch-desktop ~]$ locale -a
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
en_GB.utf8
[mattia@arch-desktop ~]$ locale
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_ALL to default locale: No such file or directory
LANG=it_IT.utf8
LC_CTYPE="it_IT.utf8"
LC_NUMERIC="it_IT.utf8"
LC_TIME="it_IT.utf8"
LC_COLLATE="it_IT.utf8"
LC_MONETARY="it_IT.utf8"
LC_MESSAGES="it_IT.utf8"
LC_PAPER="it_IT.utf8"
LC_NAME="it_IT.utf8"
LC_ADDRESS="it_IT.utf8"
LC_TELEPHONE="it_IT.utf8"
LC_MEASUREMENT="it_IT.utf8"
LC_IDENTIFICATION="it_IT.utf8"
LC_ALL=
[mattia@arch-desktop ~]$ cat .bashrc 
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return
PS1='[\u@\h \W]\$ '

# Aliases
alias rm='rm -v'
alias rmdir='rmdir -pv'
alias cp='cp -v'
alias mv='mv -v'
alias mkdir='mkdir -pv'
alias df='df -hT'
alias grep='grep --color=auto'
alias ls='ls -alh --color=auto'
alias upp='yaourt -Syu --aur'
alias rem='sudo pacman -R'
alias inst='sudo pacman -S'
alias instu='sudo pacman -U'
alias yy='yaourt'
alias aur='yaourt -G'
alias build='makepkg -s PKGBUILD'
alias abs='mkdir abs && cd abs && ABSROOT="." abs'
alias rmsvn='find . -depth -name .svn -type d -exec rm -fr {} \;'
alias isomount='mount -o loop'
alias wget='wget -c'
alias ping='ping -c 5'
alias nethogs='sudo nethogs eth0'
alias mkvmerge-gui='mmg'
alias lsusb.py='lsusb.py -c'
alias pkgfile='pkgfile -gv'
alias htop='htop -s PERCENT_CPU'
alias chown='chown -R -v'
alias chgrp='chown -R -v'
alias chmod='chmod -R -v'
alias swapoff='swapoff -v'
alias swapon='swapon -v'
alias pkgfile='sudo pkgfile'

# Export variables
if [ -n "$DISPLAY" ]; then
        export BROWSER='firefox'
        export EDITOR='geany'
        export VISUAL='geany'
else
        export BROWSER='links'
        export EDITOR='nano'
        export VISUAL='nano'
fi
export WINEPREFIX="$HOME/.wine-office10/"
export WINEARCH='win32'
export WINEDLLOVERRIDES='winemenubuilder.exe=d'
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=lcd -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'

# Complete
complete -cf sudo
complete -cf man
complete -cf info
complete -cf pkill
complete -cf kill
complete -cf killall
complete -cf gdb
complete -cf time
complete -cf watch

+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#13 2012-04-23 14:43:56

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: perl and locale problem

Do you have any other files that set locale, like /etc/locale.conf or /etc/bash.bashrc.local?
Try exporting LC_LANG in your .bashrc.

A similar thread: https://bbs.archlinux.org/viewtopic.php?id=138467

Offline

#14 2012-04-23 15:09:59

nTia89
Banned
From: varese, italy
Registered: 2008-12-22
Posts: 1,230

Re: perl and locale problem

no similar file:

ls /etc | grep locale
-rw-r--r--   1 root root   9.1K Apr 20 17:53 locale.gen

--- NEWS --- NEWS --- NEWS ---

trying with SLiM instead GDM, all seem ok:

[mattia@arch-desktop ~]$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
[mattia@arch-desktop ~]$ locale -a
C
POSIX
en_GB.utf8

is right ???

Last edited by nTia89 (2012-04-23 16:07:43)


+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome

Offline

#15 2013-03-09 20:01:29

fallen00sniper
Member
Registered: 2013-03-07
Posts: 27

Re: perl and locale problem

this helped me, apparently when installing i did not edit the correct file, as my locale.gen did not have en_US.UTF-8 UTF-8 uncommented and removing the comment and locale-gen fixed my issue, thanks.

Offline

#16 2013-10-20 22:04:23

daba
Member
Registered: 2010-03-24
Posts: 20

Re: perl and locale problem

I just had a very similar issue. Please consider checking the following files if you run into this issue:

/etc/locale.conf

Sets the default system locale. Typing locale should reflect that value.

Make sure that you have the exact corresponding value uncommented in

/etc/locale.gen

And run locale-gen afterwards. Also, make sure you don't change your locale e.g. in your .bashrc or .profile scripts to an invalid value.

@fallen00sniper: Please mark as resolved.

Offline

#17 2013-10-20 22:16:11

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: perl and locale problem

A lot has changed since April 2012. Please leave the dead to rest in peace: https://wiki.archlinux.org/index.php/Fo … Bumping.22

Closing.

Offline

#18 2013-10-20 22:21:33

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,808

Re: perl and locale problem

daba wrote:

@fallen00sniper: Please mark as resolved.

He cannot.  He is not the original poster.  The moderators don't do it, because we would not presume to know when and if another's thread is, or is not, solved.

I will, however close this old thread

Edit:  That is what I get for stepping away while posting for a few minutes.

Last edited by ewaller (2013-10-20 22:23:30)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB