You are not logged in.

#1 2009-05-02 12:45:04

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

[SOLVED] urxvt/console spanish characters

i didn't bother with this "issue" i have, because rarely i type something in spanish (my native language) in urxvt, but lately i had to use msn a lot, (yeah i hate it too, but here people use that... and facebook) so, i have to use a lot the "n" and "a,e,i,o,u" characters, the thing is, i have no problem in X apps typing those characters as you can see, but in console and urxvt i can see the "a,e,i,o,u" characters, but i cannot type them, for example, if a text file has them, i can see them in vim, but im not able to type them, but the "n" character i cannot see neither in console nor urxvt, cant see it and cannot type it, only a "?" when it is displayed...

/etc/rc.conf

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="es_AR.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="America/Argentina/Buenos_Aires"
KEYMAP="es"
CONSOLEFONT=""
CONSOLEMAP="es"
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(acpi-cpufreq mii r8169 snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd !snd-pcsp snd-hda-intel soundcore r8180 uvcvideo joydev cups usblp)

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="aleyscha"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
wlan0="wlan0 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(wlan0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.1.1"
ROUTES=(gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(Link)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network netfs crond @hal @cpufreq @alsa @gpm @sensors @wicd @bitlbee)

locale -a output:

[aleyscha@aleyscha 90 ~ 09:35]$ locale -a
C
POSIX
en_US
en_US.iso88591
en_US.utf8
es_AR
es_AR.iso88591
es_AR.utf8

.bashrc:

PS1='\033[?17;0;127c[\u@\h \# \W \A]\$ '
# stop blinking cursor in console
#if [ $TERM = 'linux' -a $SHELL = '/bin/bash' ] ; then
#        PS1='\033[?17;0;40c[\u@\h \# \W \A]\$ '
#else PS1='[\u@\h \# \W \A]\$ '
#fi

### Paths ###
PATH=$PATH:${HOME}/bin
export CDPATH=.:/sda4/Video:/sda4/Audio/Music:/sda4/Movies:/sda4/downloads
export PATH=$PATH:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin
export LC_ALL=C
export PAGER=less
export EDITOR=vim
export HISTCONTROL="ignoredups"
export MOZ_DISABLE_PANGO=1
HISTFILE=~/.history
HISTSIZE=4000
SAVEHIST=2000

### autocorrects cd misspellings, 'cd /sur/src/linus' >> 'cd /usr/src/linux' ###
shopt -s cdspell

### Aliases ###
alias hi="history"
alias mountsdd="sudo mount /dev/sdd1 /sdd1"
alias lsl="ls -l --group-directories-first --color=auto -F" #ls -l --group-directories-first --time-style=+"%Y-%m-%d %H:%M" --color=auto -F
alias ls="ls --group-directories-first --color=auto -F" #ls --group-directories-first --time-style=+"%Y-%m-%d %H:%M" --color=auto -F
alias pacman="sudo pacman"
alias y="yaourt -Syu --aur"
alias yy="yes | yaourt -Syu --aur"
alias x="startx"
alias get_log="sudo tail -f /var/log/everything.log"
alias root="sudo su"
alias Reboot="sudo reboot"
alias Shutdown="sudo shutdown -h now"
alias cp="cp -vi"
alias mv="mv -vi"
alias du="du -h"
alias df="df -h"
alias isoinfo="isoinfo -d -i"
alias log_everything="sudo tail -f /var/log/everything.log"
alias isolist="isoinfo -f -i"
alias mocp="mocp -T orpheus"
alias lsdev="ls /dev | grep sd"
alias lsuuid="ls -l /dev/disk/by-uuid/"
alias sync="rsync -r -n -t -p -o -g -v --progress --delete -l"
alias gmail="elinks www.gmail.com"
alias getlive="GetLive --config-file .getliverc"
alias irssi="irssi -n lean2501"
alias Wget="wget -P /sda4/downloads"
alias compilei686="gcc -march=athlon -O2 -pipe -fomit-frame-pointer"
alias compile="gcc -O2 -Wall -pedantic"
alias diskcheck="e2fsck -v"
alias colem32="~/bin/colem/colem32"
alias vgb="~/bin/vgb/vgb"
alias vgba="~/bin/vgba/vgba32"
alias ines="~/bin/ines/ines32"
alias clamclean="clamscan --recursive --infected --bell --remove /sda4/downloads/"
alias cdo="eject /dev/cdrom"
alias cdc="eject -t /dev/cdrom"
alias mx="chmod a+x"
alias 000="chmod 000"
alias 644="chmod 644"
alias 755="chmod 755"
alias resreset="xrandr --size 1024x600"
alias :q="exit"
alias pebrot="pebrot 2> /dev/null"
alias mplayfb="mplayer -zoom -x 1024 -y 600"
alias cplay="cplay /sda4/Audio/Music/"
alias strace="strace -e trace=file"
alias vifm="vifm ~ /sda4/downloads/"
alias doom="chocolate-doom -iwad /sda4/bin/remakes/ID/DOOM.WAD"
alias doom2="chocolate-doom -iwad /sda4/bin/remakes/ID/DOOM2.WAD"
alias heretic="chocolate-heretic -iwad /sda4/bin/remakes/ID/HERETIC.WAD"
alias hexen="chocolate-hexen -iwad /sda4/bin/remakes/ID/HEXEN.WAD"

### Functions ###

function aurget {
  cd ~/bin/arch_packages
  wget "http://aur.archlinux.org/packages/$1/$1.tar.gz" -O - | tar xzf -
  cd $1
}

# mkmv - creates a new directory and moves the file into it, in 1 step
# Usage: mkmv <file> <directory>
mkmv() {
    mkdir "$2"
    mv "$1" "$2"
}

# nh - run command detached from terminal and without output
# Usage: nh <command>
nh() {
    nohup "$@" &>/dev/null &
}

### Bash Completion ###
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

### Screen Function Retach/list :: s ###
function s {
if [[ $1 ]]; then
    screen -r $1
else
    screen -ls
fi
}
### Screen Function Init_w/title / Init :: S ###
function S {
if [[ $1 ]]; then
    screen -S $1
else
    screen -ls
fi
}
### Screen Function Mirror/List :: sx ###
function sx {
if [[ $1 ]]; then
    screen -x $1
else
    screen -ls
fi
}

### Screen Function Mirror in terminal :: scr ###
function scr {
#case $TERM in
#    xterm*|rxvt*)
    if screen -ls | grep -q Main; then
        screen -xr Main
    else
        screen -S Main
    fi
#    ;;
#esac
}

### dtach function ###
function detach {
if [ -S /tmp/$1.dtach ]; then
    dtach -a /tmp/$1.dtach
else
    dtach -c /tmp/$1.dtach $1
fi
}

### Extract Archives ###
extract () {
    if [ -f $1 ] ; then
        case $1 in
            *.tar.bz2)   tar xjvf $1    ;;
            *.tar.gz)    tar xzvf $1    ;;
            *.bz2)       bzip2 -d $1    ;;
            *.rar)       unrar2dir $1    ;;
            *.gz)        gunzip $1    ;;
            *.tar)       tar xf $1    ;;
            *.tbz2)      tar xjf $1    ;;
            *.tgz)       tar xzf $1    ;;
            *.zip)       unzip2dir $1     ;;
            *.Z)         uncompress $1    ;;
            *.7z)        7z x $1    ;;
            *.ace)       unace x $1    ;;
            *)           echo "'$1' cannot be extracted via extract()"   ;;
        esac
    else
        echo "'$1' is not a valid file"
    fi
}

#bu - Back Up a file. Usage "bu filename.txt"
bu () { cp $1 ${1}-`date +%Y%m%d%H%M`.backup ; }

if [ "$TERM" = "linux" ]; then
    echo -en "\e]P0222222" #black
    echo -en "\e]P8222222" #darkgrey
    echo -en "\e]P1803232" #darkred
    echo -en "\e]P9982b2b" #red
    echo -en "\e]P25b762f" #darkgreen
    echo -en "\e]PA89b83f" #green
    echo -en "\e]P3aa9943" #brown
    echo -en "\e]PBefef60" #yellow
    echo -en "\e]P4324c80" #darkblue
    echo -en "\e]PC2b4f98" #blue
    echo -en "\e]P5706c9a" #darkmagenta
    echo -en "\e]PD826ab1" #magenta
    echo -en "\e]P692b19e" #darkcyan
    echo -en "\e]PEa1cdcd" #cyan
    echo -en "\e]P7ffffff" #lightgrey
    echo -en "\e]PFdedede" #white
    clear #for background artifacting
fi

thanks for read!

Last edited by leo2501 (2009-05-07 10:45:29)


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#2 2009-05-05 19:05:32

TheBodziO
Member
From: Dukla, Poland
Registered: 2006-07-28
Posts: 230
Website

Re: [SOLVED] urxvt/console spanish characters

Issues with urxvt and text console are quite different from each other.

Quick-guess: try using other than default font in both. "Terminus" for example is nice and readable font for urxvt (and other terminal emulators).

If you can see all characters with desired national diacritics properly but cannot type them, then it's keyboard's map issue.

You may remove "es" from "CONSOLEMAP" values—leave it:

CONSOLEMAP=""

.

With utf8 "LOCALE" "CONSOLEMAP" value isn't used anyway.


It's not the best thing when they call you a "member" you know… wink

Offline

#3 2009-05-05 22:01:44

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: [SOLVED] urxvt/console spanish characters

maybe is something related to the fact that when i installed arch, always selected

en_US.iso88591
en_US.utf8
es_AR.iso88591
es_AR.utf8

maybe I just needed the "es_AR.utf8" and "es_AR.iso88591" locales? not selecting the en_US ones? the thing is that i don't want spanish all over the apps, i want english but to can type and see the spanish chars


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#4 2009-05-06 11:23:25

TheBodziO
Member
From: Dukla, Poland
Registered: 2006-07-28
Posts: 230
Website

Re: [SOLVED] urxvt/console spanish characters

It seems that you're using C locale (.bashrc). I think that you should use one of the utf8 locales if you're about to use wide set of characters (like en_US.utf8). Apart from that I think that chosen locale have little to do with your viewing/typing problems. I'd bet for checking out font/keymap settings in both console and X.

Last edited by TheBodziO (2009-05-06 11:42:56)


It's not the best thing when they call you a "member" you know… wink

Offline

#5 2009-05-07 10:44:57

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 658

Re: [SOLVED] urxvt/console spanish characters

well... problem solved... the secret was...

in /etc/rc.conf
LOCALE="es_AR.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="America/Argentina/Buenos_Aires"
KEYMAP="es"
CONSOLEFONT=""
CONSOLEMAP=""
USECOLOR="yes"

in .bashrc
export LC_ALL=en_US.utf8 #for arch to show all interactive messages in english instead of spanish (argentina)

or in .profile
export LC_MESSAGES=en_US.utf8

now i can see and type spanish chars in urxvt smile


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#6 2009-05-07 10:54:01

TheBodziO
Member
From: Dukla, Poland
Registered: 2006-07-28
Posts: 230
Website

Re: [SOLVED] urxvt/console spanish characters

Great!

You can remove LC_ALL and LC_MESSAGES from .bashrc and .profile respectively. Instead set LOCALE in /etc/rc.conf as "en_US.utf8" (of course if nobody else using that system wants "es_AR.utf8" locale).

Last edited by TheBodziO (2009-05-07 10:54:44)


It's not the best thing when they call you a "member" you know… wink

Offline

Board footer

Powered by FluxBB