From 04c71976500352d02f60616d2b960267d8c5fe24 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 16 Oct 2007 23:27:04 -0700 Subject: unicode diacritics support There have been issues with non-latin1 diacritics and unicode. http://bugzilla.kernel.org/show_bug.cgi?id=7746 Git 759448f459234bfcf34b82471f0dba77a9aca498 `Kernel utf-8 handling' partly resolved it by adding conversion between diacritics and unicode. The patch below goes further by just turning diacritics into unicode, hence providing better future support. The kbd support can be fetched from http://bugzilla.kernel.org/attachment.cgi?id=12313 This was tested in all of latin1, latin9, latin2 and unicode with french and czech dead keys. Turn the kernel accent_table into unicode, and extend ioctls KDGKBDIACR and KDSKBDIACR into their equivalents KDGKBDIACRUC and KDSKBDIACR. New function int conv_uni_to_8bit(u32 uni) for converting unicode into 8bit _input_. No, we don't want to store the translation, as it is potentially sparse and large. Signed-off-by: Samuel Thibault Cc: Jan Engelhardt Cc: "Antonino A. Daplas" Cc: David Woodhouse Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/kd.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/linux/kd.h') diff --git a/include/linux/kd.h b/include/linux/kd.h index 28be4fbe9044..c91fc0c9c495 100644 --- a/include/linux/kd.h +++ b/include/linux/kd.h @@ -125,6 +125,16 @@ struct kbdiacrs { #define KDGKBDIACR 0x4B4A /* read kernel accent table */ #define KDSKBDIACR 0x4B4B /* write kernel accent table */ +struct kbdiacruc { + __u32 diacr, base, result; +}; +struct kbdiacrsuc { + unsigned int kb_cnt; /* number of entries in following array */ + struct kbdiacruc kbdiacruc[256]; /* MAX_DIACR from keyboard.h */ +}; +#define KDGKBDIACRUC 0x4BFA /* read kernel accent table - UCS */ +#define KDSKBDIACRUC 0x4BFB /* write kernel accent table - UCS */ + struct kbkeycode { unsigned int scancode, keycode; }; -- cgit v1.2.3