unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 30505@debbugs.gnu.org
Subject: bug#30505: Starting console/terminal Unicode support
Date: Thu, 22 Feb 2018 00:01:05 +0100	[thread overview]
Message-ID: <20180222000105.46d017ca@scratchpost.org> (raw)
In-Reply-To: <87bmgic7bl.fsf_-_@gnu.org>

Hi Ludo,

On Wed, 21 Feb 2018 23:21:34 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

> >> This ‘unicode-start’ procedure is essentially a port of the
> >> ‘unicode_start’ script from ‘kbd’.  I suppose the justification is to
> >> make sure we’re using UTF-8 input regardless of what the kernel defaults
> >> or command-line options are.  

Yeah, but the only way to have it not use utf-8 would be to explicitly pass
"default_utf8=0" 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’d 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’s vconsole-setup.c does exactly that:
> 
>   https://github.com/systemd/systemd/blob/master/src/vconsole/vconsole-setup.c#L94

Huh, I wonder why they do it.  systemd is quite new.  I understand that older 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 = 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 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 hack
hiding the actual problem, though).

  reply	other threads:[~2018-02-21 23:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-18  0:01 bug#30505: marionette/virtio-console issues lead to test failures Ludovic Courtès
2018-02-18 10:48 ` Danny Milosavljevic
2018-02-19 15:54   ` Ludovic Courtès
2018-02-19 17:08     ` Danny Milosavljevic
2018-02-19 20:35       ` Ludovic Courtès
2018-02-19 22:35         ` Danny Milosavljevic
2018-02-21 22:21           ` bug#30505: Starting console/terminal Unicode support Ludovic Courtès
2018-02-21 23:01             ` Danny Milosavljevic [this message]
2018-02-23 21:41               ` Ludovic Courtès
2018-02-25 12:31                 ` Danny Milosavljevic
2018-02-25 12:57                   ` Danny Milosavljevic
2018-02-26 17:09                     ` Ludovic Courtès
2018-02-26 22:23                       ` Danny Milosavljevic
2018-02-27  9:25                         ` Ludovic Courtès
2018-03-15 10:41                           ` Ludovic Courtès
2018-02-19 21:53       ` bug#30505: marionette/virtio-console issues lead to test failures Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180222000105.46d017ca@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=30505@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).