lkml.org 
[lkml]   [2004]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Re: Improved console UTF-8 support for the Linux kernel?
On Mon, Dec 13, 2004 at 01:50:24AM -0500, Chris Heath wrote:

> Logically, keyboard input and console display are separated in the
> kernel. When you switch in and out of Unicode mode you have to switch
> both the keyboard and the display separately. However, this patch
> intertwines the two because it does its 8-bit to Unicode conversion
> using a table that is designed for use by the display module.
>
> I have a couple of other patches on my website, which I am happy to
> submit (or you are welcome to take), but this is the simplest and the
> most popular.

Wouldnt mind looking at your other patches.
Will not submit this one - perhaps someone else likes it.
I consider the below completely unacceptable.

You cannot use knowledge about the setup of the output side
in the keyboard handler. These are independent in principle.

Andries


> +u32 conv_8bit_to_uni(unsigned char c)
> +{
> + /*
> + * Always use USER_MAP. This function is used by the keyboard,
> + * which shouldn't be affected by G0/G1 switching, etc.
> + * If the user map still contains default values, i.e. the
> + * direct-to-font mapping, then assume user is using Latin1.
> + */
> + unsigned short uni = translations[USER_MAP][c];
> + return uni == (0xf000 | c) ? c : uni;
> +}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.047 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site