Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751425AbdDAJmg (ORCPT ); Sat, 1 Apr 2017 05:42:36 -0400 Received: from tartarus.angband.pl ([89.206.35.136]:50606 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbdDAJmf (ORCPT ); Sat, 1 Apr 2017 05:42:35 -0400 Date: Sat, 1 Apr 2017 11:42:31 +0200 From: Adam Borowski To: Linus Torvalds , linux-kernel@vger.kernel.org Subject: [GIT PULL] runes Message-ID: <20170401094231.cimb5lz43eo34jfp@angband.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="5vaf6rqbjkhisurc" Content-Disposition: inline X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: NeoMutt/20170113 (1.7.2) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3713 Lines: 93 --5vaf6rqbjkhisurc Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Linus! Please pull from https://github.com/kilobyte/linux.git runes It contains fixes for OLCUC handling, expanding its functionality to what I presume was your intention in implementing OLCUC in 1991 but couldn't be done then. The highlight is a fix for a bug that bisects all the way to 0.01, although it wasn't as visible then as shells didn't output ANSI codes during normal operation. The rest adds proper support for the Great Runes; enabled if iutf8 is set (default on modern terminals). Without these fixes, even basic shell output is mangled: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D kilobyte@andunie:~$ stty olcuc [01;32MKILOBYTE@ANDUNIE[00M:[01;34M~[00M$ LS [01;34MGOATPORN[0M =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D With the fixes, to get the old-style OLCUC behaviour ASCII you can stty -iutf8; neither ANSI codes nor Unicode will be mangled anymore. But, that's quite useless -- I wonder what was your reason to implement OLCUC back in the day even though it was obsolete by decades even then, and was already dropped from relevant standards. Thus, I guess you want proper rune support, this pull request adds this. I've chosen Elder Futhark as the variant to implement. You might want to consider dropping patch 3, it is required only for full coverage of the target set (Elder Futhark) but not for regular ASCII mapping, and brings some code complexity. Required userspace support is present in default GUI installs of all distributions I checked, both on old-style terminals that use server-side X fonts and with client-side {true,open}type -- but not on console unless someone adds the required characters to the charset, which is tricky because of 256/512 glyph limitations. Thus, runes support currently works only on graphical terminals. Meow! -- sorry, =E1=9B=97=E1=9B=96=E1=9B=9F=E1=9A=B9! Commits up to 14f34ba1d8748f252f941b5bb87efd7b1ed55868 on top of c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201. ---------------------------------------------------------------- Adam Borowski (4): n_tty: don't mangle tty codes in OLCUC mode n_tty: use runes rather than uppercase in IUTF8 OLCUC mode n_tty: support th, ae and ng runes n_tty: wrap all OLCUC code in a config option drivers/tty/Kconfig | 17 ++++++++ drivers/tty/n_tty.c | 115 ++++++++++++++++++++++++++++++++++++++++++++++--= ---- 2 files changed, 120 insertions(+), 12 deletions(-) --=20 =E2=A2=80=E2=A3=B4=E2=A0=BE=E2=A0=BB=E2=A2=B6=E2=A3=A6=E2=A0=80 Meow! =E2=A3=BE=E2=A0=81=E2=A2=A0=E2=A0=92=E2=A0=80=E2=A3=BF=E2=A1=81 =E2=A2=BF=E2=A1=84=E2=A0=98=E2=A0=B7=E2=A0=9A=E2=A0=8B=E2=A0=80 Collisions = shmolisions, let's see them find a collision or second =E2=A0=88=E2=A0=B3=E2=A3=84=E2=A0=80=E2=A0=80=E2=A0=80=E2=A0=80 preimage fo= r double rot13! --5vaf6rqbjkhisurc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEE/Zzi2Nd1S3irJ5u9LDtDb+rGgQEFAljfdgAACgkQLDtDb+rG gQGjigf9FpmNTxaHIOuGUWU9nDbKzVylgQobMqUmVbZFmGv4WKjh4PF3le1U0xXF skNhnbrtw1xnZx8KHMtG9HXcL1RuOFS1KD9Aspb948JLhHGzx9R2ExnGCyYEN2x+ L3Cps0qFZg0UWel/I1w9qFIPSw5RT3tG5bl0EoEk8Ph0hTRQRW6fTwzSy/RHejYS jPtBDJ+ySSsbKDdv2NWO7MP0bC7bOTVf7rx2WIzuijlHghE9c+yvS79DiEhS+ywt LAagfWKHsye2OpOkZ0i55cRQi7Z2W0XEkK7biEVb94PB1JgTFu/rWnOfC7E2mCT+ cUc11Evok5Rx/m8kqAuhFkI0tqSrfA== =sh2j -----END PGP SIGNATURE----- --5vaf6rqbjkhisurc--