Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 118441 - Slowdown and warnings when using "en_US.UTF-8" locale.
Summary: Slowdown and warnings when using "en_US.UTF-8" locale.
Status: RESOLVED WORKSFORME
Alias: None
Product: [OLD] Docs-user
Classification: Unclassified
Component: Other (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Docs Team
URL: http://www.gentoo.org/doc/en/utf-8.xml
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-09 11:41 UTC by paapaa125
Modified: 2006-10-02 10:30 UTC (History)
1 user (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 paapaa125 2006-01-09 11:41:20 UTC
(Not sure if this belongs to "Other" or "Localisation Guide" component.)

I started using "en_US.UTF-8" locale after using the default "POSIX" locale for a while without any problems. I used the guide "Using UTF-8 with Gentoo":

http://www.gentoo.org/doc/en/utf-8.xml

The output of "locale" is correct (LC_*="en_US.UTF-8"). Also "locale -a" lists "en_US.UTF-8". Things didn't work totally after setting up the new locale:

1. Starting "xfontsel", "xcalc" or "xedit" results in a 8 sec wait with 100% CPU usage before the window opens. It also results this warning message in the terminal: 

"Warning: Missing charsets in String to FontSet conversion"

I did not test with all X related programs. 

2. Also FVWM window manager complains about "Missing font charsets" related to the font called Fixed.

I managed to fix the problem totally by adding "cjk" to USE flags. That is supposed to add support for Multi-byte character languages (Chinese, Japanese, Korean). I have no idea why it works or what the warning message means. 

The warning messages and slowdowns appear again if I recompile with "-cjk".

I'm not sure if this is a missing piece of information in "Using UTF-8 with Gentoo" guide or if there is actually a problem in the procedure for setting up the locale. Of course there might be a problem with my setup.

Here are two other similar cases:

http://forums.gentoo.org/viewtopic-t-369667.html
http://forums.gentoo.org/viewtopic-t-264229.html
Comment 1 Jan Kundrát (RETIRED) gentoo-dev 2006-01-09 13:22:31 UTC
X11, is this known issue?
Comment 2 paapaa125 2006-01-09 13:41:45 UTC
Addition: 

Even with "cjk" USE flag "xcalc" doesn't launch immediately like with "POSIX" locale. With "en_US.UTF-8" locale there is still a 0.4 sec delay. I'm not sure if that is to be expected when working in UTF-8 environment. The 8s delay, however, is gone as I described in the bug report.
Comment 3 Donnie Berkholz (RETIRED) gentoo-dev 2006-01-09 16:11:46 UTC
Works fine for me.

I don't have LANG set manually, but I do set export LC_ALL="en_US.utf8" in ~/.bashrc. Can you try that?
Comment 4 SpanKY gentoo-dev 2006-01-09 16:22:23 UTC
if a package has sucky utf handling then there will be delays

for example, try running Eterm with your lang set to a unicode one and it'll delay for quite a while
Comment 5 paapaa125 2006-01-12 03:24:51 UTC
One more addition:

1. I never installed any additional font packs. I only installed those which come by default with X.
2. I don't have "font-server" USE flag enabled.
3. When I remove "cjk" from the USE flags these packages get recompiled: "x11-base/xorg-x11-6.8.2-r6", "net-print/cups-1.1.23-r4", "app-text/ghostscript-esp-7.07.1-r8". I guess it is xorg, which breaks the system.
4. No NLS support in kernel. Should not be needed as I only use ext3.

Could someone with totally working "en_US.UTF-8" locale post his/her USE flags? By "totally working" I mean someone who doesn't use "cjk" flag and still don't get any warning messages or delays.
Comment 6 nm (RETIRED) gentoo-dev 2006-01-12 09:59:11 UTC
(In reply to comment #5)
> Could someone with totally working "en_US.UTF-8" locale post his/her USE flags?
> By "totally working" I mean someone who doesn't use "cjk" flag and still don't
> get any warning messages or delays.

# emerge --info

Portage 2.1_pre3-r1 (default-linux/x86/2005.1, gcc-3.4.4, glibc-2.3.5-r2, 2.6.12-gentoo-r9 i686)
=================================================================
System uname: 2.6.12-gentoo-r9 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.13
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -mtune=pentium3 -pipe -O3 -fweb -frename-registers -fforce-addr -fomit-frame-pointer -ftracer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -mtune=pentium3 -pipe -O3 -fweb -frename-registers -fforce-addr -fomit-frame-pointer -ftracer -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache confcache distlocks sandbox sfperms"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LINGUAS="en"
MAKEOPTS="-j2"
USE="x86 X a52 aac acpi alsa apm audiofile avi berkdb bitmap-fonts bzip2 cdr crypt cups curl dbus dvd emboss encode esd exif expat fam firefox flac foomaticdb fortran gd gdbm gif glut gnome gpm gstreamer gtk gtk2 gtkhtml hal idn imlib jpeg lame lcms libg++ libwww mad mikmod mime mmx mng motif mozsvg mp3 mpeg ncurses nls nptl nvidia ogg oggvorbis opengl oss pam pcmcia pcre pdflib perl png python readline recode samba sdl sndfile spell sse ssl svg tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb vorbis win32codecs xml2 xmms xv zlib elibc_glibc kernel_linux linguas_en userland_GNU"
Unset:  ASFLAGS, CTARGET, LDFLAGS

* * *

$ locale

LANG=en_US.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

* * *

Works for me . . .
Comment 7 Jan Kundrát (RETIRED) gentoo-dev 2006-01-18 10:38:37 UTC
I'd mark this bug as a WORKSFORME. You should bug the respective upstream developers if they don't support UTF-8 environment...
Comment 8 paapaa125 2006-01-22 06:08:02 UTC
Still don't know what actually causes this. Maybe this has something to do with FVWM window manager I use, don't know. I have to investigate this a bit more some other time. Now it WORKSFORME...
Comment 9 Sam 2006-10-02 02:59:36 UTC
Jesus.. i just got the same thing here, took me a while to figure out why out of a sudden my machine comes to a near halt just when i click on the Eterm icon on my desktop.. 

I just switched to en_US.UTF-8 (and en_GB too), moving away from POSIX. And yes, certain apps are rediculously SLOW, and take up 100% cpu time to load.

I'm mainly speaking about Eterm at the moment. Konsole and Xterm load well.
Comment 10 Donnie Berkholz (RETIRED) gentoo-dev 2006-10-02 10:30:36 UTC
See https://bugs.gentoo.org/show_bug.cgi?id=71747#c21