You are not logged in.

#1 2011-11-09 17:35:55

ehabreda
Member
From: Qatar
Registered: 2011-07-22
Posts: 52
Website

[SOLVED] Locale problems!

Hello,
I have a weired problem regarding locale languages.
I edited my /etc/locale.gen and deleted everything except

ar_EG.UTF-8 UTF-8  
ar_EG ISO-8859-6  
en_US.UTF-8 UTF-8  
en_US ISO-8859-1

Then I made:

$ sudo locale-gen
Generating locales...
  ar_EG.UTF-8... done
  ar_EG.ISO-8859-6... done
  en_US.UTF-8... done
  en_US.ISO-8859-1... done
Generation complete.

when I type

locale -a

it returns with

$ 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
C
POSIX
ar_EG
ar_EG.iso88596
ar_EG.utf8
en_US
en_US.iso88591
en_US.utf8

when I try to compile anything it always says

svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is en_GB.utf8
svn: warning: please check that your locale name is correct

where this GB came from??

My rc.conf is ok...

LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="localtime"
TIMEZONE="Asia/Qatar"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

Need help, please.

Last edited by ehabreda (2011-11-09 18:47:15)

Offline

#2 2011-11-09 17:40:52

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

Re: [SOLVED] Locale problems!

What's the output of 'locale'?
Are you exporting your LANG somewhere, like .bashrc?
What shell are you using?

Last edited by karol (2011-11-09 17:41:12)

Offline

#3 2011-11-09 18:16:27

ehabreda
Member
From: Qatar
Registered: 2011-07-22
Posts: 52
Website

Re: [SOLVED] Locale problems!

Hey Karol,

$ 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=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC=en_US.utf8
LC_TIME=en_US.utf8
LC_COLLATE=C
LC_MONETARY=en_US.utf8
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT=en_US.utf8
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=

My bashrc

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
export HISTCONTROL=ignoredups
export HISTSIZE=10000
shopt -s histappend
shopt -s checkwinsize

alias nano='nano -wz'
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
alias ln='ln -i'
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'


alias ls='ls -hF --color=auto'
alias lr='ls -R'
alias la='ls -A'
alias lm='la | less'
alias ll='ls -al'
alias lx='ll -BX'        # sort by extension
alias lz='ll -rS'        # sort by size
alias lt='ll -rt'        # sort by date

export LESS="-R"
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
if [ -x /usr/bin/colordiff ]
then
	alias diff='colordiff'
fi

man() {
        # Less Colors for Man Pages:
        # _mb = begin blinking
        # _md = begin bold
        # _me = end mode
        # _se = end standout-mode
        # _so = begin standout-mode - info box
        # _ue = end underline
        # _us = begin underline

        env \
                LESS_TERMCAP_mb=$'\E[01;31m' \
                LESS_TERMCAP_md=$'\E[01;32m' \
                LESS_TERMCAP_me=$'\E[0m' \
                LESS_TERMCAP_se=$'\E[0m' \
                LESS_TERMCAP_so=$'\E[01;44;33m' \
                LESS_TERMCAP_ue=$'\E[0m' \
                LESS_TERMCAP_us=$'\E[01;04;34m' \
                        man "$@"
}


alias more='less'
alias df='df -h'
alias du='du -c -h'
alias mkdir='mkdir -p -v'
alias ping='ping -c 5'
alias ..='cd ..'

alias da='date "+%A, %B %d, %Y [%T]"'
alias du1='du --max-depth=1'
alias hist='history | grep $1'
alias openports='netstat --all --numeric --programs --inet --inet6'
alias pss='ps -Af | grep $1'

if [ $UID -ne 0 ]; then
    alias sudo='sudo '
    alias scat='sudo cat'
fi

if [ `id -u` != "0" ]; then
    export PS1='\n[\[\e[1;35m\]\t\[\e[0m\]] [\u @\h] \[\e[1;32m\]\w\[\e[0m\]\n\[\e[1m\]\$\[\e[0m\] '
else
    export PS1='\n[\[\e[1;35m\]\t\[\e[0m\]] [\[\e[1;31m\]\u\[\e[0m\] @\h] \[\e[1;32m\]\w\[\e[0m\]\n\[\e[1;31m\]\$\[\e[0m\] '
fi

Offline

#4 2011-11-09 18:20:06

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

Re: [SOLVED] Locale problems!

Offline

#5 2011-11-09 18:27:34

ehabreda
Member
From: Qatar
Registered: 2011-07-22
Posts: 52
Website

Re: [SOLVED] Locale problems!

No I don't have /etc/locale.conf
and unfortunately I don't understand the link!!! What should I do after deleting the /etc/profile.d/locale.sh

Offline

#6 2011-11-09 18:29:47

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

Re: [SOLVED] Locale problems!

ehabreda wrote:

No I don't have /etc/locale.conf
and unfortunately I don't understand the link!!! What should I do after deleting the /etc/profile.d/locale.sh

The link is just some background info to refresh your memory, but as you're using bash and haven't got any extra locale.conf, it doesn't matter, you needn't do anything.

Have you tried to set your locale correctly and reboot?

Offline

#7 2011-11-09 18:34:50

ehabreda
Member
From: Qatar
Registered: 2011-07-22
Posts: 52
Website

Re: [SOLVED] Locale problems!

Yes I did and not working!
Should I delete /etc/profile.d/locale.sh and create /etc/locale.conf and put

LANG=en_US.UTF-8
LC_MESSAGES=C

Offline

#8 2011-11-09 18:39:01

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

Re: [SOLVED] Locale problems!

It's enough if you add it to your ~/.bashrc:

export LANG=en_US.UTF-8
export LC_MESSAGES="C"

and reboot.

Offline

#9 2011-11-09 18:46:40

ehabreda
Member
From: Qatar
Registered: 2011-07-22
Posts: 52
Website

Re: [SOLVED] Locale problems!

Thanks Karol, it worked.
can you check this link
https://bbs.archlinux.org/viewtopic.php?id=129758

Offline

#10 2011-11-09 18:53:10

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

Re: [SOLVED] Locale problems!

ehabreda wrote:

Thanks Karol, it worked.

I still don't get  why was it needed in the first place ...

ehabreda wrote:

Unfortunately I know nothing about this matter :-(

Offline

Board footer

Powered by FluxBB