| Summary: | patches for correct cyrilic support in unicode | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Alexander Simonov <devil> |
| Component: | [OLD] baselayout | Assignee: | 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
Created attachment 44553 [details, diff]
patch for keymaps
Created attachment 44554 [details, diff]
rc.conf patch
patch for new rc.conf variable
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 Why?
gentoo patches # dumpkeys --help
dumpkeys версии 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
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 It's not simple. KISS - is a unix way and that it must be simple and stupid :) 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 OK. Then changing bug status ;) 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=""
|