From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Date: Fri, 17 Apr 2009 22:01:40 +0200 From: Michael Schutte To: Linux console tools development discussion Message-ID: <20090417200140.GA28229@graeme> Mail-Followup-To: Linux console tools development discussion References: <49E676DE.70200@gmail.com> <20090416154504.GA8180@graeme> <49E7B8B5.5000302@gmail.com> <49E887B1.7020301@gmail.com> <20090414174549.GA4174@graeme> <49E5021C.5040703@gmail.com> <20090415135344.GA3881@graeme> <49E676DE.70200@gmail.com> <20090416154504.GA8180@graeme> <49E7B8B5.5000302@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vkogqOf2sHV7VnPd" Content-Disposition: inline In-Reply-To: <49E887B1.7020301@gmail.com> <49E7B8B5.5000302@gmail.com> Jabber-ID: schm@yne.at User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: [kbd] =?utf-8?q?=5BPATCH=5D_loadkeys=3A_Auto-convert_=E2=80=9Ctra?= =?utf-8?q?ditional=E2=80=9D/Unicode_keysyms?= X-BeenThere: kbd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Linux console tools development discussion List-Id: Linux console tools development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2009 20:01:59 -0000 Archived-At: List-Archive: --vkogqOf2sHV7VnPd Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 17, 2009 at 03:01:09AM +0400, Alexey Gladkov wrote: > I tested exactly like that: >=20 > $ src/unicode_stop > $ export LANG=3Dru_RU.koi8r > $ setfont data/consolefonts/koi8r-8x16 >=20 > # loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map >=20 > $ < I getting correct chars when I typing a russian text > > $ dumpkeys -n > dump-loadkeys.old >=20 > # src/loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map >=20 > $ < I getting wrong chars when I typing a russian text > > $ dumpkeys -n > dump-loadkeys.new >=20 > # loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map >=20 > $ < correct chars again > This is just weird :-( Here=E2=80=99s what I get: $ src/unicode_stop $ export LANG=3Dru_RU.koi8r $ setfont data/consolefonts/koi8r-8x16 # loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map # [some chars] # dumpkeys -n >dumpkeys.old # src/loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map # [the same chars] # dumpkeys -n >dumpkeys.new $ diff dumpkeys.* $ No differences at all. I fail to see what is going on here. loadkeys is from master (86d0ca1) and src/loadkeys from master plus my patch, right? Just so we don=E2=80=99t talk about different codebases here. > >> How do you test this patch? > > Pretty much the way you do: loadkeys, typing some things, >=20 >=20 > Hmmm ... you typing in what language? I tried it some with some Latin alphabets (the German, French, and Turkish keymaps), Cyrillic and Greek. > Your patch will change the behaviour. At least for the russian keymaps > will need to add "charset" directive. We have 4 charsets (koi8-r, > cp1251, cp855, iso8859-5 and utf8). Without "charset" you do not know > what encoding is used in keymap. The point is, my patch should not change the behaviour of loadkeys when it is called in the =E2=80=9Ctraditional=E2=80=9D way. If the console is i= n Unicode mode and the user loads a Unicode keymap, or if the console is in XLATE mode and the user loads a non-Unicode keymap, everything should work as before: In these cases, loadkeys should perform no conversion at all. So there=E2=80=99s no problem if a file is missing a =E2=80=9Ccharset=E2=80= =9D line as long as the user doesn=E2=80=99t change the way they use loadkeys =E2=80=93 hence, = no regression. And indeed, that=E2=80=99s exactly what the patch does on my system. I have yet to figure out why you are getting entirely different results. > > The true reason why I want to push this, though, is that Debian=E2=80= =99s > > version of kbd has had a similar patch since 2004.=20 >=20 > I want to be completely sure it's working with old keymaps. That is a top priority for me as well, of course. I would hate to break everyone=E2=80=99s systems in fancy unexpected ways. > > I=E2=80=99d like to get rid of this divergence without losing its usefu= l features. >=20 > This is a good reason. :) >=20 > > This is why I=E2=80=99ve cleaned it up and why I=E2=80=99m discussing i= t with you now. >=20 > I am concerned keymaps legacy. We have a lot of keymaps that are not > added to the kbd package. Your patch should support the old behaviour > for them. Probably would be better to implement a new option to > enable/disable autodetection. I=E2=80=99m completely with you on the legacy part. Whether to make the auto-detection an opt-in feature, I leave for you to decide. First of all, I think that the bloody thing should work on every machine :-) On Fri, Apr 17, 2009 at 05:44:17PM +0400, Alexey Gladkov wrote: > 17.04.2009 03:01, Alexey Gladkov wrote: > > # loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map > > $ < I getting correct chars when I typing a russian text > > > $ dumpkeys -n > dump-loadkeys.old > > # src/loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map > >=20 > > $ < I getting wrong chars when I typing a russian text > >=20 > I see a strange thing. Characters on the console in unicode mode, > after the src/loadkeys has been executed. This is very strange indeed. Firstly, this is not reflected in the dumps you sent me. And second, the KDSKBENT ioctls should fail if loadkeys even tries to assign Unicode keysyms in XLATE mode. I=E2=80=99ll try to come up with an idea for what I am missing during this weekend. If you have got any thoughts as to what is going wrong, I would be glad to hear them. Cheers, --=20 Michael Schutte --vkogqOf2sHV7VnPd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQEcBAEBAgAGBQJJ6OAkAAoJEPPkEi8djCYadZgH/0wTu9umWlnpFspE5ySrJjWx n+iZdfbY32MN4ncMlWpVERHyhtLbI6/QpkQV8LeRewXnqJwV+/25EF5Vk+EEDHlk ewkeXdZbys2wUFgL1bGKI/39bLaytvSlZJXgk8SOh/QobXqj2+UamcyMgeBVgg+e F2ys0xozO2mZxr5FlK0Ip5bzaPdfQE3woQmx+GpdE99W/+lS8AP7Ew9Mi1ylr0wK S3dw+zl+pSWYf6Qnee52Y1/fUWm/ncYY60x49UyOpNHiKDmqT7Kb8cYj3J+1LO3l m0/obONpxFjt40GrZ9dJj/BdwTe+Tvk2lNKL00cyvg1aYON+d7h+WwDgVfVZojQ= =AZUc -----END PGP SIGNATURE----- --vkogqOf2sHV7VnPd--