Linux console tools development discussion
 help / color / mirror / Atom feed
From: Michael Schutte <michi@uiae.at>
To: Linux console tools development discussion <kbd@lists.altlinux.org>
Subject: Re: [kbd] [PATCH] loadkeys: Auto-convert “traditional”/Unicode keysyms
Date: Thu, 16 Apr 2009 17:45:04 +0200
Message-ID: <20090416154504.GA8180@graeme> (raw)
In-Reply-To: <49E676DE.70200@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2534 bytes --]

On Thu, Apr 16, 2009 at 04:07:58AM +0400, Alexey Gladkov wrote:
> Your patch still does not work for me.
> 
> $ kbd_mode -a
> $ export LANG=ru_RU.koi8r
> $ setfont data/consolefonts/koi8r-8x16
> # loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map
> 
> When typing characters are visible correctly.
> 
> But with your patch:
> 
> # src/loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map

Do you do this right after the above commands, or after you restored
Unicode mode?  I guess it’s the latter; at least as far as I can see,
the two commands behave identically when they are run in immediate
succession.

> When I typing the characters displayed incorrectly.

Oh, alright!  This is the problem: There is no way to automatically
figure out that this keymap is written in the koi8-r encoding, so the
characters are taken from the wrong charset tables (the ones in ksyms.c
and *.syms.h) and converted into Unicode.  The patched version of
loadkeys seems to do the right thing when you add

	charset "koi8-r"

at the beginning of ruwin_cplk-KOI8-R.map.  Can you confirm this?

> How do you test this patch?

Pretty much the way you do: loadkeys, typing some things, verifying that
dumpkeys doesn’t show different results (and if so, whether the
differences are intended by my patch).

> Can you show how loadkeys with this patch to be used in the examples?

I’d say it should be used just the same way as before, just that it
should work regardless of the input file’s encoding.  As long as this
keymap file has a “charset” specification, that is; I have to admit that
I didn’t consider that so many .map files don’t feature such a line.
Still, this shouldn’t be a regression: When the input encoding and the
console mode (XLATE/Unicode) are compatible, my patch shouldn’t change
the behaviour.

> I'm not sure that understand this. Do you want to load 8-bit keymaps
> for UTF locales and unicode keymaps for non-UTF locales ? Am i right ?

Yup, that’s exactly what I want it to do.  It strikes me as a quite
sensible thing to do, given that there are a few keymaps that differ
only in their encodings.

The true reason why I want to push this, though, is that Debian’s
version of kbd has had a similar patch since 2004.  I’d like to get rid
of this divergence without losing its useful features.  This is why I’ve
cleaned it up and why I’m discussing it with you now.

Thanks for you patience :-)
-- 
Michael Schutte <michi@uiae.at>

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 489 bytes --]

  reply	other threads:[~2009-04-16 15:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14 17:45 Michael Schutte
2009-04-14 21:37 ` Alexey Gladkov
2009-04-15 13:53   ` Michael Schutte
2009-04-16  0:07     ` Alexey Gladkov
2009-04-16 15:45       ` Michael Schutte [this message]
2009-04-16 23:01         ` Alexey Gladkov
2009-04-17 13:44           ` Alexey Gladkov
2009-04-17 20:01     ` Michael Schutte
2009-04-19 15:59       ` Alexey Gladkov
2009-04-19 16:50         ` Michael Schutte
2009-04-19 17:14           ` Alexey Gladkov
2009-04-20 18:39             ` Michael Schutte
2009-04-21 10:08             ` Alexey Gladkov
2009-04-21 13:20               ` Michael Schutte
2009-04-16 23:36 ` Alexey Gladkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090416154504.GA8180@graeme \
    --to=michi@uiae.at \
    --cc=kbd@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux console tools development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/kbd/0 kbd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kbd kbd/ http://lore.altlinux.org/kbd \
		kbd@lists.altlinux.org kbd@lists.altlinux.ru kbd@lists.altlinux.com
	public-inbox-index kbd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.kbd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git