Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] help with locale utf-8 for brazilian portuguese
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 446
Location: Sao Paulo, Brazil

PostPosted: Sat Apr 10, 2010 8:43 pm    Post subject: [SOLVED] help with locale utf-8 for brazilian portuguese Reply with quote

Hi there,
I am struggling to set the locale correctly. I have followed the official gentoo guide http://www.gentoo.org/doc/en/guide-localization.xml with no success. There are lots of questions about utf-8 and locale in the forum, but I could be able to figure out the right combination so as can have accents like this: áéíóú çÇãÃõÕ.
My config files are as follow:
Code:
externo ferreirafm # emerge --info
Portage 2.1.7.17 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r10 i686)
=================================================================
System uname: Linux-2.6.31-gentoo-r10-i686-Intel-R-_Pentium-R-_4_CPU_1500MHz-with-gentoo-1.12.13
Timestamp of tree: Sat, 10 Apr 2010 15:00:02 +0000
app-shells/bash:     4.0_p37
dev-java/java-config: 1.3.7-r1, 2.1.10
dev-lang/python:     2.4.6, 2.5.4-r4, 2.6.4-r1
dev-python/pycrypto: 2.1.0_beta1
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.6.3-r1, 1.7.9-r1, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.1.2, 4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="pt_BR.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="pt_BR en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa bash-completion berkdb bzip2 cairo cdr cli cracklib crypt cups cxx dbus dri dvd dvdr dvdread emacs embedded emboss encode ffmpeg firefox flac fortran ftp gcj gdbm ggc gif gimp gpm gtk gzip hal iconv imagemagick ipv6 java java5 jpeg kde kpathsea latex midi mng modules motif mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin nss nvidia ogg opengl openmp pam pcre pdf perl png pppd python qt3 qt3support qt4 readline reflection reiserfs samba session spell spl sql ssl svg sysfs tar tcpd tetex tiff tk truetype type1 unicode vorbis webkit win32codecs x86 xorg zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pt_BR en" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Code:
externo etc # more /portage/sys-libs/glibc/files/locales.build
en_US/ISO-8859-1
en_US.UTF-8/UTF-8
pt_BR/ISO-8859-1
pt_BR.UTF-8/UTF-8


Code:
externo ferreirafm # locale -a
C
POSIX
en_US
en_US.iso88591
en_US.utf8
pt_BR
pt_BR.iso88591
pt_BR.utf8


Code:
externo ferreirafm # locale
LANG=pt_BR.UTF-8
LC_CTYPE="pt_BR.UTF-8"
LC_NUMERIC="pt_BR.UTF-8"
LC_TIME="pt_BR.UTF-8"
LC_COLLATE=C
LC_MONETARY="pt_BR.UTF-8"
LC_MESSAGES="pt_BR.UTF-8"
LC_PAPER="pt_BR.UTF-8"
LC_NAME="pt_BR.UTF-8"
LC_ADDRESS="pt_BR.UTF-8"
LC_TELEPHONE="pt_BR.UTF-8"
LC_MEASUREMENT="pt_BR.UTF-8"
LC_IDENTIFICATION="pt_BR.UTF-8"
LC_ALL=


Code:
externo env.d # more 02locale
LANG="pt_BR.UTF-8"
LC_COLLATE="C"


Code:
externo etc # more locale.gen
en_US.UTF-8 UTF-8
en_US ISO-8859-1
pt_BR.UTF-8 UTF-8
pt_BR ISO-8859-1


Code:
externo conf.d # more keymaps
# /etc/conf.d/keymaps
KEYMAP="us"
#KEYMAP="us-acentos"
#KEYMAP="br-latin1-us"


Code:
externo conf.d # more consolefont
# /etc/conf.d/consolefont

CONSOLEFONT="default8x16"

#CONSOLETRANSLATION="8859-1_to_uni"


Code:
Section "InputDevice"

    Identifier     "Keyboard0"
    Driver         "kbd"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us_intl"
    Option         "XkbVariant" "nodeadkeys"


These settings used to work until my last full update.
Any clues are very appreciated.


Last edited by ferreirafm on Tue Apr 13, 2010 3:37 am; edited 1 time in total
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 446
Location: Sao Paulo, Brazil

PostPosted: Mon Apr 12, 2010 12:11 am    Post subject: Reply with quote

After several attempts... The problem has been solved with the following command:
Code:
setxkbmap -model pc105 -layout us -variant intl

Setting the keyboard layout and variant throughout the xorg.conf didn't work.
So, the problem remains technically unsolved. Any comments?
Best of Luck,
ferreirafm

P.S.: áéíóú àãà çÇ :D
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 5267

PostPosted: Mon Apr 12, 2010 8:52 pm    Post subject: Reply with quote

this is probably a hal/evdev issue and you're late with dealing with it
- in 1.8 server, other scheme will be the default.
As for correct values, see /usr/share/X11/xkb/rules/evdev.lst.
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 446
Location: Sao Paulo, Brazil

PostPosted: Tue Apr 13, 2010 3:36 am    Post subject: Reply with quote

Ok, lets wait for the 1.8 xorg-server. I had already suspected about some evdev problem. There were lots of posts pointing to the .fdi rules for evdev. However, I couldn't manege to make it works.
Anyway, at list I have a workaround.
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7209
Location: Pelotas, BR

PostPosted: Tue Apr 13, 2010 2:54 pm    Post subject: Reply with quote

This is a working /etc/hal/fdi/policy/10-keymap.fdi for ABNT2 keyboards:

Code:


<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>

    <match key="info.capabilities" contains="input.keys">
      <merge key="input.xkb.rules" type="string">base</merge>

      <!-- If we're using Linux, we use evdev by default (falling back to
           keyboard otherwise). -->
      <merge key="input.xkb.model" type="string">keyboard</merge>
      <match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
             string="Linux">
        <merge key="input.xkb.model" type="string">evdev</merge>
      </match>

      <merge key="input.xkb.layout" type="string">br</merge>
      <merge key="input.xkb.variant" type="string">abnt2</merge>
    </match>
  </device>
</deviceinfo>


Remeber that you should restart hal service after adding this file.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
rgazapo
n00b
n00b


Joined: 30 Apr 2007
Posts: 7
Location: Cuba

PostPosted: Wed Jun 09, 2010 2:59 pm    Post subject: Reply with quote

ferreirafm wrote:
After several attempts... The problem has been solved with the following command:
Code:
setxkbmap -model pc105 -layout us -variant intl

Setting the keyboard layout and variant throughout the xorg.conf didn't work.
So, the problem remains technically unsolved. Any comments?
Best of Luck,
ferreirafm

P.S.: áéíóú àãà çÇ :D


I have been trying to solve this issue for long time. With your command line added to my .bashrc I finally can type áéíóúñ on X.

But searching more deep on the forum a found this solution :

https://forums.gentoo.org/viewtopic-t-758627-highlight-usacentos.html

With both, I have the same result.

Thank's
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum