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: Thu, 16 Apr 2009 17:45:04 +0200 From: Michael Schutte To: Linux console tools development discussion Message-ID: <20090416154504.GA8180@graeme> Mail-Followup-To: Linux console tools development discussion References: <20090414174549.GA4174@graeme> <49E5021C.5040703@gmail.com> <20090415135344.GA3881@graeme> <49E676DE.70200@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <49E676DE.70200@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: Thu, 16 Apr 2009 15:45:26 -0000 Archived-At: List-Archive: --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 16, 2009 at 04:07:58AM +0400, Alexey Gladkov wrote: > Your patch still does not work for me. >=20 > $ kbd_mode -a > $ export LANG=3Dru_RU.koi8r > $ setfont data/consolefonts/koi8r-8x16 > # loadkeys data/keymaps/i386/qwerty/ruwin_cplk-KOI8-R.map >=20 > When typing characters are visible correctly. >=20 > But with your patch: >=20 > # 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=E2=80=99s the latter; at least as far as I can se= e, 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=E2=80=99t 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=E2=80=99d say it should be used just the same way as before, just that it should work regardless of the input file=E2=80=99s encoding. As long as th= is keymap file has a =E2=80=9Ccharset=E2=80=9D specification, that is; I have = to admit that I didn=E2=80=99t consider that so many .map files don=E2=80=99t feature suc= h a line. Still, this shouldn=E2=80=99t be a regression: When the input encoding and = the console mode (XLATE/Unicode) are compatible, my patch shouldn=E2=80=99t cha= nge 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=E2=80=99s 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=E2=80=99s version of kbd has had a similar patch since 2004. I=E2=80=99d like to get= rid of this divergence without losing its useful features. This is why I=E2=80= =99ve cleaned it up and why I=E2=80=99m discussing it with you now. Thanks for you patience :-) --=20 Michael Schutte --RnlQjJ0d97Da+TV1 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) iQEcBAEBAgAGBQJJ51J6AAoJEPPkEi8djCYaiCMH/i1ntAoFRFxBh0TuyOeikOhG dGpEMnNPxBFZcF3fun+SA59Sh9FhwVEAn85NbNbNjXzLYu7ieSYffMPw1KNzT+bM yQoB+10oDWY0qwGiTgOp2zGucsoqR0SHiliRHSkLZWDl3VqacAu4RNEJecrYP0Z/ BmZoddRIKQJunX3D11RSJ9NkTPG03r6gZOxcfe7T1dwNnhVRStb1GNrkSNH4DixF gTYHIWl1I2fcsNZr3HX8KjQYOvaXqhnPcvq7pB4LpEth2bDJVttjNWaZApWOTNOw FjdVxh1DH2oYmZ+WK8BdlDe9nzjG+Z16+Uu/GW2E1d7ZlWoz6Wo8X/f8VPAfbHw= =zYko -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--