From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#30505: Starting console/terminal Unicode support Date: Fri, 23 Feb 2018 22:41:19 +0100 Message-ID: <87lgfjbczk.fsf@gnu.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> <20180222000105.46d017ca@scratchpost.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]:57395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1epL6U-00061o-PD for bug-guix@gnu.org; Fri, 23 Feb 2018 16:42:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1epL6Q-0000Dm-QC for bug-guix@gnu.org; Fri, 23 Feb 2018 16:42:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:50121) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1epL6Q-0000DO-Le for bug-guix@gnu.org; Fri, 23 Feb 2018 16:42:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1epL6Q-0001s9-6C for bug-guix@gnu.org; Fri, 23 Feb 2018 16:42:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20180222000105.46d017ca@scratchpost.org> (Danny Milosavljevic's message of "Thu, 22 Feb 2018 00:01:05 +0100") 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: Danny Milosavljevic Cc: 30505@debbugs.gnu.org Hello! Danny Milosavljevic skribis: > 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 = of 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 kern= el defaults >> >> or command-line options are.=20=20 > > Yeah, but the only way to have it not use utf-8 would be to explicitly pa= ss > "default_utf8=3D0" as a command-line parameter. I think at that point the > user deserves what he personally asked for :P (He or she.) But yeah, that makes sense. >>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 no= t so bad. > > I just thought that if it causes trouble *and* it's not needed anymore, t= he > simplest way is to just remove it. Yeah. >> Also, FWIW, systemd=E2=80=99s vconsole-setup.c does exactly that: >>=20 >> https://github.com/systemd/systemd/blob/master/src/vconsole/vconsole-s= etup.c#L94 > > Huh, I wonder why they do it. systemd is quite new. I understand that o= lder 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",= one_zero(utf8), 0); > if (r < 0) > return log_warning_errno(r, "Failed to %s sysfs UTF-8 fla= g: %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 ev= en > check what's up before trying to write the 'G' (the latter sounds like a = hack > hiding the actual problem, though). Yeah, we could simply write =E2=80=9C1=E2=80=9D to that file I guess. Let=E2=80=99s do that? Thanks for explaining, Ludo=E2=80=99.