From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#30505: Starting console/terminal Unicode support Date: Thu, 22 Feb 2018 00:01:05 +0100 Message-ID: <20180222000105.46d017ca@scratchpost.org> References: <87vaevi2sk.fsf@gnu.org> <20180218114833.7d5e7848@scratchpost.org> <87r2phezzv.fsf@gnu.org> <20180219180849.3a509e80@scratchpost.org> <87d110g1l2.fsf@gnu.org> <20180219233553.31aeef1a@scratchpost.org> <87bmgic7bl.fsf_-_@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eodQB-0003Kt-NM for bug-guix@gnu.org; Wed, 21 Feb 2018 18:04:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eodOl-0006Om-TL for bug-guix@gnu.org; Wed, 21 Feb 2018 18:03:31 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:47143) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eodOl-0006Nt-IT for bug-guix@gnu.org; Wed, 21 Feb 2018 18:02:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eodOl-00071K-1S for bug-guix@gnu.org; Wed, 21 Feb 2018 18:02:03 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87bmgic7bl.fsf_-_@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 30505@debbugs.gnu.org Hi Ludo, On Wed, 21 Feb 2018 23:21:34 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > >> This =E2=80=98unicode-start=E2=80=99 procedure is essentially a port o= f the > >> =E2=80=98unicode_start=E2=80=99 script from =E2=80=98kbd=E2=80=99. I = suppose the justification is to > >> make sure we=E2=80=99re using UTF-8 input regardless of what the kerne= l defaults > >> or command-line options are. =20 Yeah, but the only way to have it not use utf-8 would be to explicitly pass "default_utf8=3D0" as a command-line parameter. I think at that point the user deserves what he personally asked for :P >In > other cases (custom kernel build with different defaults, different > kernel command-line settings, etc.), we=E2=80=99d just get it wrong with = things > breaking down the path, no? Yes, it would just default to ASCII. In the big scheme of things it's not = so bad. I just thought that if it causes trouble *and* it's not needed anymore, the simplest way is to just remove it. > Also, FWIW, systemd=E2=80=99s vconsole-setup.c does exactly that: >=20 > https://github.com/systemd/systemd/blob/master/src/vconsole/vconsole-se= tup.c#L94 Huh, I wonder why they do it. systemd is quite new. I understand that old= er stuff (like kbd) did it because they had to in the Linux 2.4 days - but this? We should ask them... Aha, they also have static int toggle_utf8_sysfs(bool utf8) { int r; r =3D write_string_file("/sys/module/vt/parameters/default_utf8", o= ne_zero(utf8), 0); if (r < 0) return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag:= %m", enable_disable(utf8)); log_debug("Sysfs UTF-8 flag %sd", enable_disable(utf8)); return 0; } so we could in fact directly force the VT driver to do our bidding, or even check what's up before trying to write the 'G' (the latter sounds like a ha= ck hiding the actual problem, though).