Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196369 - x11-terms/gnome-terminal-2.18.2 has an incorrect current locale
Summary: x11-terms/gnome-terminal-2.18.2 has an incorrect current locale
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-19 08:03 UTC by Den_M
Modified: 2008-02-05 13:29 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Den_M 2007-10-19 08:03:15 UTC
After updating "world" couple of days ago, I found that gnome-terminal-2.18.2 has incorrect current locale "ANSI_X3.4-1968" instead of "UTF-8" as was before updating.

Such setting fails gnome-terminal to display i18n symbols. Every time i use gnome-terminal I have to change in menu character encoding to UTF-8 to display them correct.
This is bug of feature? Or may be in new packages I have to set something new variables?

emerge --info
Portage 2.1.3.14 (default-linux/amd64/2007.0, gcc-4.2.2, glibc-2.6.1-r0, 2.6.22-suspend2-r1.nicevt.den_m x86_64)
=================================================================
System uname: 2.6.22-suspend2-r1.nicevt.den_m x86_64 Intel(R) Pentium(R) D CPU 3.00GHz
Timestamp of tree: Thu, 18 Oct 2007 07:00:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.5.1-r2
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="ru_RU.utf8"
LC_ALL="en_US.utf8"
LINGUAS="en ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/usr/src"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 ao audiofile bash-completion berkdb bindist bitmap-fonts bonobo bzip2 cairo cddb cdparanoia cdr clamav cli cracklib crypt cups curl curlwrappers dbus dga directfb dri dts dv dvb dvd dvdr dvdread encode esd exif expat fbcon ffmpeg fftw firefox flac fortran gd gdbm gif gnome gpm graphviz gstreamer gtk hal iconv imagemagick imlib ipv6 isdnlog jabber jack javascript jbig jpeg jpeg2k lcms libcaca libnotify libsamplerate mad maildir matroska midi mikmod mime mmx mng mp3 mpeg mplayer mudflap musepack ncurses nls nptl nptlonly offensive ogg openal opengl openmp oss pam pcre pdf perl plotutils png portaudio posix pppd python quicktime rdesktop readline reflection samba sdl session shorten sndfile sockets sound sox speex spell spl sse sse2 ssl startup-notification svg sysfs tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd vorbis wmf x264 xcomposite xine xinerama xml xorg xosd xpm xprint xv xvid zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="i810"
Unset:  CTARGET, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Mart Raudsepp gentoo-dev 2007-10-19 16:55:46 UTC
Please show us the output of "locale"
Comment 2 Rémi Cardona (RETIRED) gentoo-dev 2007-10-28 07:53:39 UTC
I've just had this issue on one of my box where I had a very old Gentoo .bashrc that sourced /etc/profile, which gets LANG from /etc/env.d/*

The fix for me was to use the .bashrc from /etc/skel which is more recent.

Either way, please try that and reopen the bug if it doesn't fix it.
Comment 3 Den_M 2007-10-29 12:29:30 UTC
(In reply to comment #1)
> Please show us the output of "locale"
> 

LANG=ru_RU.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

>I've just had this issue on one of my box where I had a very old Gentoo .bashrc
>that sourced /etc/profile, which gets LANG from /etc/env.d/*
>The fix for me was to use the .bashrc from /etc/skel which is more recent.
>Either way, please try that and reopen the bug if it doesn't fix it.

My ~/.bashrc don't source /etc/profile or any of /etc/skel/*.
LANG and LC_ALL are set in ~/.bashrc
Comment 4 Sergiy Borodych 2007-12-10 12:20:56 UTC
Same problem

On both: ~x86 and ~amd64

my .bashrc is copy from /etc/skel/.bashrc

$ equery b /etc/skel/.bashrc
[ Searching for file(s) /etc/skel/.bashrc in *... ]
app-shells/bash-3.2_p17-r1 (/etc/skel/.bashrc)


$ locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC=POSIX
LC_TIME=POSIX
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES=POSIX
LC_PAPER="ru_RU.UTF-8"
LC_NAME="ru_RU.UTF-8"
LC_ADDRESS="ru_RU.UTF-8"
LC_TELEPHONE="ru_RU.UTF-8"
LC_MEASUREMENT="ru_RU.UTF-8"
LC_IDENTIFICATION="ru_RU.UTF-8"
LC_ALL=

If I run gnome-terminal from already opened gnome-terminal even with locale ANSI_X3.4-1968 - it open with UTF-8 current locale

It problem appear not so long ago
Comment 5 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-12-10 17:07:28 UTC
Do you have your gnome-terminal configure to run login shells?  It's an option on the Title and Command tab.
Comment 6 Sergiy Borodych 2007-12-10 20:47:24 UTC
(In reply to comment #5)
> Do you have your gnome-terminal configure to run login shells?  It's an option
> on the Title and Command tab.
> 

yes
this option is on (enable)

enable/disable this option does not give any effect
Comment 7 Jürgen Geuter 2008-01-15 17:29:38 UTC
I can reproduce the issue for gnome-terminal-{2.18.2,2.18.3,2.18.4}. All have the same bug while the locale is set properly.

The output of locale:
LANG=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

Since all those gnome-terminals seem to have the issue now and I did not see that problem pop up before I think it might be a problem with something in the background.

My emerge --info:
Portage 2.1.4 (default-linux/x86/2007.0/desktop, gcc-4.2.2, glibc-2.7-r1, 2.6.23-gentoo i686)
=================================================================
System uname: 2.6.23-gentoo i686 AMD Athlon(tm) XP 2600+
Timestamp of tree: Tue, 15 Jan 2008 09:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.3
dev-lang/python:     2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/config"
CONFIG_PROTECT_MASK="/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/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.gentoo.mesh-solutions.com/gentoo/ ftp://140.127.177.15/pub/Linux/Gentoo http://mirror.pacific.net.au/linux/Gentoo ftp://mirror.pacific.net.au/linux/Gentoo http://mirrors.64hosting.com/pub/mirrors/gentoo/"
LANG="en_US"
LC_ALL="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/lila-theme /usr/portage/local/layman/sunrise /usr/portage/local/layman/flameeyes /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex X aac aalib acl acpi aiglx alsa applet audiofile avahi bash-completion berkdb bitmap-fonts bluetooth bookmarks branding browserplugin bzip2 cairo cddb cdparanoia cdr cli cracklib crypt css cups curl daap dav dba dbus divx4linux dpms dri dvd dvdnav dvdr dvdread eds emboss encode esd evo examples fam ffmpeg font-server fortran freetype fuse galago gd gdbm gedit gif glitz glx gnome gnutls gpm gsf gstreamer gtk gtk2 hal hbci iconv imap ipod ipv6 isdnlog ithreads jabber joystick jpeg jpeg2k kerberos keyring kolab lame ldap libnotify libsamplerate live mad matroska midi mikmod mjpeg mmap mmx mmx2 mng mono mozbranding mozdevelop moznocompose moznoirc moznomail mozsvg mp3 mpeg mplayer mudflap musicbrainz nautilus ncurses netwpork newspr nforce2 nls nptl nptlonly nsplugin ntfs nvidia offensive ogg opengl openmp oss pam pcre pdf pdo perl pic plugin png postgres pppd psyco pulseaudio python qt3 qt3support qt4 quicktime rar rdesktop readline real reflection reiser4 reiserfs samba sasl sdl session sftp sndfile speex spell spl sqlite ssl stream streamripper subversion svg tcpd theora threads tidy tiff tracker truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vcd vorbis win32codecs wxwindows x86 xcomposite xgetdefault xine xinerama xml xml2 xorg xosd xrandr xulrunner xv xvid zeroconf 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 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" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia vesa nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 8 Jürgen Geuter 2008-01-16 15:04:10 UTC
Somehow the gnome session seems to not pickup the right locale and sets it wrong for the whole gnome thingy.

I rebuild my en_US locale to use UTF-8 and now it works, before it did not use the en_US.UTF-8 that I had specified. With all non-UTF-8 locales gone the issue is fixed though I'm not sure what actually is wrong.
Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-01-16 15:29:39 UTC
I must point out that on a fresh install it did work for me right away without even touching any config file.
Comment 10 Jürgen Geuter 2008-01-16 16:03:17 UTC
Well, it must have been a locale thing cause rebuilding them all to use just unicode fixed it. What locale does a current fresh Gentoo install set? One with UTF-8?

When I started a Terminal the bash within had all the right settings, when I logged in into textmode it worked, too. It must have either been gdm or some gnome-* thingy.

Funny thing. When I started a terminal the terminal itself had iso-8859-1 (what the bug was about) but when I ran "gnome-terminal" from within the newly spawned terminal worked correctly.

I did some more poking, when I locked my screen (CTRL+ALT+L) and I want to log in again, it should show my Name (Jürgen Geuter) which it did but with a messed up "ü" so it was not just gnome-terminal but other gnome programs, too, which is Why I guess the process that spawned gnome might have had some wrong locale.
Comment 11 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-01-16 16:15:02 UTC
I'm an UTF-8 addict so I only use that in my locale.gen. Note that gdm-2.20 series restart itself when you select another language so you can have translated text, so locale of gnome-session and any other gnome stuff should be correct.
Comment 12 Bill Roberts 2008-02-04 14:38:59 UTC
I was having this problem, even though my locale -a was showing all "en_US.UTF-8".

I was finally able to fix this problem.

I had an old .bashrc, so I had to replace that with /skel/.bashrc

I had to add "LC_ALL="en_US.UTF-8"" in a newly created /etc/env.d/02locale.

I had to rebuild locales, "localedef -i en_US -f UTF-8 en_US.UTF-8"

I threw in "env-update" a couple of times, and rebooted (may not have been necessary), and voilá, UTF-8 came up as default. 

Took hours to figure all this out, but it appears the problem is not with the gnome-terminal ebuild, but rather the .bashrc and the locales, as above.

Key for me was the Gentoo documentation, http://www.gentoo.org/doc/en/utf-8.xml.

I suggest that this bug could be closed.

Bill Roberts
Comment 13 Rémi Cardona (RETIRED) gentoo-dev 2008-02-04 14:59:44 UTC
Closing then :)

If anyone else has an issue, don't hesitate to reopen this bug or open a new one. Thanks
Comment 14 Den_M 2008-02-05 13:29:01 UTC
(In reply to comment #12)
> I was having this problem, even though my locale -a was showing all
> "en_US.UTF-8".
> 
> I was finally able to fix this problem.
> 
> I had an old .bashrc, so I had to replace that with /skel/.bashrc
> 
> I had to add "LC_ALL="en_US.UTF-8"" in a newly created /etc/env.d/02locale.
> 
> I had to rebuild locales, "localedef -i en_US -f UTF-8 en_US.UTF-8"
> 
> I threw in "env-update" a couple of times, and rebooted (may not have been
> necessary), and voilá, UTF-8 came up as default. 
> 
> Took hours to figure all this out, but it appears the problem is not with the
> gnome-terminal ebuild, but rather the .bashrc and the locales, as above.
> 
> Key for me was the Gentoo documentation,
> http://www.gentoo.org/doc/en/utf-8.xml.
> 
> I suggest that this bug could be closed.
> 
> Bill Roberts
> 

Yahoo! It works for me, thank you very much :)