Console applications (MC, menuconfig for kernel, EVMSN) are garbled when I set UNICODE="yes" in my rc.conf. It is seems similar to garbage in http://bugs.gentoo.org/show_bug.cgi?id=98778. When I set UNICODE="no" and reinit console services all is OK. It was reproduced with and without frame-buffer support. If I reset terminal (with 'reset' command) all is OK too, but UTF-8 text is unreadable. Video Card: nVidia GeForce7800GT /proc/cmdline: doevms2 ramdisk_size=8192 real_root=/dev/evms/root locale -a: C en_US en_US.utf8 POSIX ru_RU ru_RU.cp1251 ru_RU.koi8r ru_RU.utf8 equery u mc: +7zip +X +gpm +ncurses +nls +pam -samba +slang +unicode equery u ncurses: -bootstrap -build -debug -doc +gpm -minimal -nocxx +unicode query u slang: -cjk +unicode equery u glibc: -build -erandom -glibc-compat20 +glibc-omitfp -hardened -linuxthreads-tls -multilib +nls +nptl +nptlonly +pic -profile -selinux +userlocales emerge --info -v: Gentoo Base System version 1.6.14 Portage 2.0.54 (default-linux/amd64/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15-gentoo-r1-mini x86_64) ================================================================= System uname: 2.6.15-gentoo-r1-mini x86_64 AMD Athlon(tm) 64 Processor 3200+ ccache version 2.3 [enabled] dev-lang/python: 2.3.5, 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.22 virtual/os-headers: 2.6.11-r2 ABI="amd64" ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="" ARCH="amd64" AUTOCLEAN="yes" BASH_ENV="/etc/spork/is/not/valid/profile.env" CBUILD="x86_64-pc-linux-gnu" CCACHE_SIZE="2G" CDEFINE_amd64="__x86_64__" CDEFINE_x86="__i386__" CFLAGS="-O3 -march=k8 -pipe -fomit-frame-pointer" CFLAGS_x86="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib" CHOST="x86_64-pc-linux-gnu" CHOST_amd64="x86_64-pc-linux-gnu" CHOST_x86="i686-pc-linux-gnu" CLEAN_DELAY="5" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -march=k8 -pipe -fomit-frame-pointer" DEFAULT_ABI="amd64" DISTDIR="/usr/portage/distfiles" ELIBC="glibc" EMERGE_WARNING_DELAY="10" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P ${DISTDIR} ${URI}" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" HOME="/home/serzh" KERNEL="linux" LDFLAGS_x86="-m elf_i386 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib" LIBDIR_amd64="lib64" LIBDIR_x86="lib32" LOGNAME="root" MAKEOPTS="-j2" MULTILIB_ABIS="x86 amd64" MULTILIB_STRICT_DENY="64-bit.*shared object" MULTILIB_STRICT_DIRS="/lib /usr/lib /usr/kde/*/lib /usr/qt/*/lib /usr/X11R6/lib" MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|eclipse-3|debug|portage)" PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/3.4.4" PKGDIR="/usr/portage/packages" PORTAGE_ARCHLIST="alpha amd64 arm hppa ia64 m68k mips ppc ppc64 ppc-macos s390 sh sparc x86" PORTAGE_BINHOST_CHUNKSIZE="3000" PORTAGE_CALLER="emerge" PORTAGE_GID="250" PORTAGE_MASTER_PID="9184" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PRELINK_PATH="" PRELINK_PATH_MASK="" RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P ${DISTDIR} ${URI}" RPMDIR="/usr/portage/rpm" RSYNC_RETRIES="3" RSYNC_TIMEOUT="180" SHELL="/bin/bash" STAGE1_USE="pam" SUDO_COMMAND="/usr/bin/emerge --info -v" SUDO_GID="100" SUDO_UID="1000" SUDO_USER="serzh" SYMLINK_LIB="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" TERM="linux" USE="amd64 X acpi alsa avi bash-completion berkdb bitmap-fonts bzip2 crypt cups encode expat fbcon foomaticdb gif gpm hal imlib jpeg lzw lzw-tiff mad mmap mp3 mpeg ncurses nls nptl opengl pam pcre pdflib perl pic png python readline sdl slang spell ssl symlink tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales xml2 xpm xv zlib userland_GNU kernel_linux elibc_glibc" USER="root" USERLAND="GNU" USE_EXPAND="FRITZCAPI_CARDS FCDSL_CARDS VIDEO_CARDS DVB_CARDS INPUT_DEVICES LINGUAS USERLAND KERNEL ELIBC" XARGS="xargs -r"
Created attachment 80696 [details] My /proc/config.gz It is minimal configuration when the bug is reprodusable.
You don't simply enable unicode in rc.conf and pray it works. You also have to have the proper font support to. Japanese utf8 for example will not work in console, simply because there's no font support for it. Now European fonts (spanish, french, etc.) are more likely to have font support. If you're really that in need of better utf8 support in the console, you're going to have to try something like a framebuffer console for that sort of thing.
Created attachment 80697 [details] rc.conf
Created attachment 80698 [details] make.conf
Created attachment 80699 [details] Screenshot of the garbled MC (for kernel's menuconfig it is similarity) I made this screenshot in fb-mode (standard vesafb), but without fb-mode it is similarity.
(In reply to comment #2) > You don't simply enable unicode in rc.conf and pray it works. You also have to > have the proper font support to. Japanese utf8 for example will not work in > console, simply because there's no font support for it. Now European fonts > (spanish, french, etc.) are more likely to have font support. If you're really > that in need of better utf8 support in the console, you're going to have to try > something like a framebuffer console for that sort of thing. I tried set cyrillic consoel font (keymap etc). With text in bash all is OK. But there artifacts in ncurses application (I tried to rebuild MC with slang only, without ncurses - but all the same). If I set UNICODE="no" artifacts are missed. Please look at the screenshot...
This is wonderful, why have you censored all your locale settings from emerge --info -v output?! Don't you think this info is pretty important here? Or you don't have them set at all? Post the output of 'locale' command and also exactly which consolefont are you using.
Also, current version of slang in portage doesn't support unicode at all, recompile mc with USE="-slang".
(In reply to comment #7) > Post the output of 'locale' command and also exactly which consolefont are you > using. There's 'locale' command output: LANG=ru_RU LC_CTYPE="ru_RU" LC_NUMERIC="ru_RU" LC_TIME=POSIX LC_COLLATE="ru_RU" LC_MONETARY="ru_RU" LC_MESSAGES=en_US LC_PAPER="ru_RU" LC_NAME="ru_RU" LC_ADDRESS="ru_RU" LC_TELEPHONE="ru_RU" LC_MEASUREMENT="ru_RU" LC_IDENTIFICATION="ru_RU" LC_ALL= /etc/conf.d/consolefont: CONSOLEFONT="ruscii_8x16" # All other settings (CONSOLETRANSLATION) are default and I didn't change them.
(You don't need to CC yourself if you're the reporter) Well.. you actually need to have a utf8 locale set... export LC_ALL=ru_RU.utf8 export LANG=ru_RU.utf8
(In reply to comment #8) > Also, current version of slang in portage doesn't support unicode at all, > recompile mc with USE="-slang". I have unmerged slang lib from my system and rebuilt mc without slang. All the same: evmsn, mc and menuconfig are unusable.
(In reply to comment #10) > (You don't need to CC yourself if you're the reporter) Thank you. I just have never used Bugzilla early. > Well.. you actually need to have a utf8 locale set... > > export LC_ALL=ru_RU.utf8 > export LANG=ru_RU.utf8 I tried "ru_RU.UTF-8" and even "en_US". I use short "ru_RU" because I have "ru_RU/UTF-8" in my locales.build.
(In reply to comment #12) > I use short "ru_RU" because I have "ru_RU/UTF-8" in my locales.build. Eh? Please, read the UTF-8 guide: http://www.gentoo.org/doc/en/utf-8.xml You have (among others) the following locales compiled: ru_RU ru_RU.cp1251 ru_RU.koi8r ru_RU.utf8 and you assume that something will automagically pick up the unicode one? :-O
(In reply to comment #13) Sorry, I've confused you. I tried run MC, EVMSN and menuconfig with SUDO which don't inherit LC_* settings (for root they all are "POSIX"). Now I've emerged slang and run MC with LC_ALL="ru_RU.UTF-8". All is good. BTW, without slang MC is quite ugly (but still usable). And another issue: if I set LC_MESSAGE to invalid value (just "ru_RU" for example) then "segmentation fault" comes when MC exited. I think is't some slang error. I assumed if I added "ru_RU/UTF-8" line into my locales.build and reemerged glibc then UTF-8 should be used for ru_RU by default. I've been mistaken. It's interested why I built locale "foo_FOO/UTF-8" and set LC_ALL="foo_FOO" UTF-8 doesn't work by default...
Well, locales.build doesn't work that way. Here's what happens: 1) You set the userlocales USE flag in glibc 2) you setup locales.build with only the locales you need 3) glibc will build only those locales, saving you a good ammount of compile time (this was done because the standard glibc locale generation time was uneededly long) The true way that locale variables are set, however, is through the environment, or more specifically the LC_* and LANG variables. Setting them to the default for the country will give you a different result depending on the language. For example, Japanese has euc-jp setup as the default. UTF8 is, in general, not the default for most languages. This is why you have to set them up, generally through a custom /etc/env.d/ file, through /etc/profile, through .bashrc, or through .xinitrc (depending on your specific requirements). You can see what locales are avaliable with locale -a, and see which ones are active by simply running locale with no parameters.
(In reply to comment #15) > The true way that locale variables are set, however, is through the > environment, or more specifically the LC_* and LANG variables. Setting them to > the default for the country will give you a different result depending on the > language. For example, Japanese has euc-jp setup as the default. UTF8 is, in > general, not the default for most languages. This is why you have to set them > up, generally through a custom /etc/env.d/ file, through /etc/profile, through > .bashrc, or through .xinitrc (depending on your specific requirements). You > can see what locales are avaliable with locale -a, and see which ones are > active by simply running locale with no parameters. > I see. Thank you.