From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>,
Jan Engelhardt <jengelh@linux01.gwdg.de>,
Paul LeoNerd Evans <leonerd@leonerd.org.uk>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH] vt: Expose system-wide UTF-8 default setting via sysfs
Date: Tue, 03 Apr 2007 09:24:29 +0800 [thread overview]
Message-ID: <4611ACCD.5000305@gmail.com> (raw)
Create a variable, default_utf8, that defines the system-wide default UTF-8
setting. This variable can be altered via sysfs. If the variable is properly
set, this should mimimize breakage of UTF-8 encoded consoles when doing a
reset or echo -e '\033c' and of newly opened/allocated consoles.
This is based from patches by Jan Engelhardt and Paul LeoNerd Evans.
Signed-off-by: Antonino Daplas <adaplas@gmail.com>
---
> I think you're missing the whole point of console reset. Its purpose is
> to force the console into a known-good state. The fewer pieces of state
> it leaves unset, the better. To some degree it's less important what
> that state actually is.
Okay, you convinced me. Hopefully this is acceptable to all parties.
Andrew,
If everybody agrees, can you drop the previous patch I sent to you, and use
this instead?
Tony
drivers/char/vt.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 1bbb45b..8aca96f 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -157,6 +157,8 @@ static void blank_screen_t(unsigned long
static void set_palette(struct vc_data *vc);
static int printable; /* Is console ready for printing? */
+static int default_utf8;
+module_param(default_utf8, int, S_IRUGO | S_IWUSR);
/*
* ignore_poke: don't unblank the screen when things are typed. This is
@@ -1497,7 +1499,7 @@ static void reset_terminal(struct vc_dat
vc->vc_charset = 0;
vc->vc_need_wrap = 0;
vc->vc_report_mouse = 0;
- vc->vc_utf = 0;
+ vc->vc_utf = default_utf8;
vc->vc_utf_count = 0;
vc->vc_disp_ctrl = 0;
next reply other threads:[~2007-04-03 1:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-03 1:24 Antonino A. Daplas [this message]
2007-04-03 4:06 ` [PATCH] vt: Expose system-wide UTF-8 default setting via sysfs Alexander E. Patrakov
2007-04-03 5:47 ` Antonino A. Daplas
2007-04-03 16:20 ` Pavel Machek
2007-04-03 16:35 ` Paul LeoNerd Evans
2007-04-04 5:39 ` Antonino A. Daplas
2007-04-04 8:01 ` Pavel Machek
2007-04-06 14:30 ` Paul LeoNerd Evans
2007-04-06 15:39 ` H. Peter Anvin
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=4611ACCD.5000305@gmail.com \
--to=adaplas@gmail.com \
--cc=akpm@osdl.org \
--cc=hpa@zytor.com \
--cc=jengelh@linux01.gwdg.de \
--cc=leonerd@leonerd.org.uk \
--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