Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 72225

Summary: patches for correct cyrilic support in unicode
Product: Gentoo Linux Reporter: Alexander Simonov <devil>
Component: [OLD] baselayoutAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for keymaps
rc.conf patch

Description Alexander Simonov 2004-11-23 05:09:21 UTC
this pathes fixing the problem with cyrilic support in base scripts in unicode locale

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




gentoo patches # emerge info
Portage 2.0.51-r3 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20041102-r0, 
2.6.8-gentoo-r7 i686)
=================================================================
System uname: 2.6.8-gentoo-r7 i686 Intel(R) Celeron(R) CPU 2.00GHz
Gentoo Base System version 1.6.6
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r5
Automake: sys-devel/automake-1.8.5-r1
Binutils: sys-devel/binutils-2.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r6
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.
2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/
share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ ftp://ftp.belnet.be/mirror/
rsync.gentoo.org/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://gentoo.org.ua/gentoo-portage"
USE="X apm arts avi berkdb bitmap-fonts cdr crypt cups encode esd f77 fam flac 
foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 guile imagemagick imlib 
java jpeg junit ldap libg++ libwww mad mikmod mmx motif mozilla mpeg mysql 
ncurses nls oggvorbis opengl oss pam pdflib perl png python quicktime readline 
ruby samba sdl slang spell sqlite sse ssl svga tcltk tcpd tiff truetype unicode 
x86 xml xml2 xmms xv zlib"

gentoo patches # locale
LANG=ru_RU.UTF-8
LC_CTYPE="ru_RU.UTF-8"
LC_NUMERIC="ru_RU.UTF-8"
LC_TIME="ru_RU.UTF-8"
LC_COLLATE="ru_RU.UTF-8"
LC_MONETARY="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"
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=
Comment 1 Alexander Simonov 2004-11-23 05:10:03 UTC
Created attachment 44553 [details, diff]
patch for keymaps
Comment 2 Alexander Simonov 2004-11-23 05:11:03 UTC
Created attachment 44554 [details, diff]
rc.conf patch 

patch for new rc.conf variable
Comment 3 SpanKY gentoo-dev 2004-11-23 05:53:40 UTC
according to the manpage for dumpkeys, you're not passing valid values for the -c param ...

besides, i'd be more inclined to add a UNICODE_DUMPKEYS_OPTS variable and have users set it to like '-c blah' themselves
Comment 4 Alexander Simonov 2004-11-23 06:00:02 UTC
Why?
gentoo patches # dumpkeys --help
dumpkeys &#1074;&#1077;&#1088;&#1089;&#1080;&#1080; 1.12
usage: dumpkeys [options...]

valid options are:

        -h --help           display this help text
        -i --short-info     display information about keyboard driver
        -l --long-info      display above and symbols known to loadkeys
        -n --numeric        display keytable in hexadecimal notation
        -f --full-table     don't use short-hand notations, one row per keycode
        -1 --separate-lines one line per (modifier,keycode) pair
           --funcs-only     display only the function key strings
           --keys-only      display only key bindings
           --compose-only   display only compose key combinations
        -c --charset=iso-8859-{1,2,3,4,5,7,8,9,10,15},koi8-{r,u},mazovia,cp-1250,iso-10646-18,iso-ir-197,iso-ir-209
                            interpret character action codes to be from the
                            specified character set
It's all correct
Comment 5 SpanKY gentoo-dev 2004-11-23 07:25:44 UTC
why what ? :P

i didnt say your stuff was wrong (i dont use UNICODE anywhere so i cant test it), just saying the manpage didnt list the features you were using (so the bug is that the manpage is out of date)

either way, i'm still inclined to just add a DUMPKEYS_OPT variable and make users set it to '-c koi8-r' themselves ... much more flexible this way
Comment 6 Alexander Simonov 2004-11-23 07:55:32 UTC
It's not simple.
KISS - is a unix way and that it must be simple and stupid :)
Comment 7 SpanKY gentoo-dev 2004-11-23 08:29:24 UTC
yes, but simple for users or simple for internals ? :)

my solution has a lot more flexibility and we dont have to develop some kind of variable->option translation everytime a user wants some new support for dumpkeys
Comment 8 Alexander Simonov 2004-11-23 08:44:42 UTC
OK. Then changing bug status ;)
Comment 9 SpanKY gentoo-dev 2004-11-24 08:49:08 UTC
ok, i kind of lied :)

looking at `dumpkeys --help`, the only option a user would want to utilize is the -c option ... so i've applied this patch:
--- init.d/keymaps      21 Oct 2004 19:05:52 -0000      1.25
+++ init.d/keymaps      24 Nov 2004 16:38:19 -0000
@@ -53,4 +53,7 @@
        then
+               local dumpkey_opts=""
+               [ -n "${DUMPKEYS_CHARSET}" ] && dumpkey_opts="-c ${DUMPKEYS_CHARSET}"
+
                /usr/bin/kbd_mode -u
-               dumpkeys | loadkeys --unicode
+               dumpkeys ${dumpkey_opts} | loadkeys --unicode
                termencoding=$'\033%G'

the DUMPKEYS_CHARSET variable is set in the new /etc/conf.d/keymaps:
# Tell dumpkeys(1) to interpret character action codes to be 
# from the specified character set.
# This only matters if you set UNICODE="yes" in /etc/rc.conf.
# For a list of valid sets, run `dumpkeys --help`

DUMPKEYS_CHARSET=""