public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul LeoNerd Evans <leonerd@leonerd.org.uk>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Fix to virtual terminal UTF-8 mode handling
Date: Wed, 18 May 2005 12:04:46 +0100	[thread overview]
Message-ID: <20050518120446.2eeb559f@nim.leo> (raw)
In-Reply-To: <20050517195848.4a09318d.akpm@osdl.org>

[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]

On Tue, 17 May 2005 19:58:48 -0700
Andrew Morton <akpm@osdl.org> wrote:

> Paul LeoNerd Evans <leonerd@leonerd.org.uk> wrote:
> >
> >  This patch fixes a bug in the virtual terminal driver, whereby the
> > UTF-8 mode is reset to "off" following a console reset, such as might
> > be delivered by mingetty, screen, vim, etc...
> 
> Is it a bug?  What did earlier kernels do?  2.4.x?

I haven't checked earlier 2.4 kernels, but I know the 2.6 ones have done
this for quite some time; a good year or so at least.

> Presumably userspace knows what mode the user wants the terminal to be
> using.  Shouldn't userspace be resetting that mode after a reset?

Well, that does require changes to a lot of the programs that talk to the
console, moreover, they now need to be sensitive to whether it is in
UTF-8 mode, where previously they did not. E.g. consider mingetty...

Also, as I understand it, there is one keyboard map, and one console font
for the entire virtual console system - either they are UTF-8, or not. It
doesn't really make sense to be switching these about.

Moreover, this code also affects dynamic creation of new virtual
consoles. E.g. when debian's "oh no, I can't start the X server" ncurses
dialog appears, without my patch it prints UTF-8 characters on a new
console, tty8, on a console that isn't set to display them, and mass
breakage results. Now, it all happens cleanly, because the new console is
already in UTF-8 mode.

Were this to be pushed to userland, every program that outputs data would
need to detect the UTF-8 mode of the console, and set it appropriately.
Moreover, they would need to perform this logic only on a Linux virtual
console; such things as XTerm or Gnome-terminal do it automatically.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2005-05-18 11:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-18  2:05 [PATCH] Fix to virtual terminal UTF-8 mode handling Paul LeoNerd Evans
2005-05-18  2:15 ` Paul LeoNerd Evans
2005-05-18  2:58 ` Andrew Morton
2005-05-18  3:10   ` Daniel Jacobowitz
2005-05-18 11:10     ` Paul LeoNerd Evans
2005-05-18 11:04   ` Paul LeoNerd Evans [this message]

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

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

  git send-email \
    --in-reply-to=20050518120446.2eeb559f@nim.leo \
    --to=leonerd@leonerd.org.uk \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox