vt: preserve unicode values corresponding to screen characters
authorNicolas Pitre <nicolas.pitre@linaro.org>
Wed, 27 Jun 2018 03:56:40 +0000 (23:56 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 12:38:12 +0000 (21:38 +0900)
commitd8ae7242718738ee1bf9bfdd632d2a4b150fdd26
tree8196e325f2c2defc50155c65a5b30ba5e952b3a8
parent34b6a3a91f87851bc0ea9e6776266f23d8acf388
vt: preserve unicode values corresponding to screen characters

The vt code translates UTF-8 strings into glyph index values and stores
those glyph values directly in the screen buffer. Because there can only
be at most 512 glyphs, it is impossible to represent most unicode
characters, in which case a default glyph (often '?') is displayed
instead. The original unicode value is then lost.

This patch implements the basic screen buffer handling to preserve unicode
values alongside corresponding display glyphs.  It is not activated by
default, meaning that people not relying on that functionality won't get
the implied overhead.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Dave Mielke <Dave@mielke.cc>
Acked-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt.c
include/linux/console_struct.h