diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2007-10-17 02:27:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:42:52 -0400 |
commit | 04c71976500352d02f60616d2b960267d8c5fe24 (patch) | |
tree | ed0d84a533e26a2c9f18d53413d183252e1d925f /include | |
parent | abdbf94d7c6f1fcb2931d5cb7562a6159323b704 (diff) |
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 <samuel.thibault@ens-lyon.org>
Cc: Jan Engelhardt <jengelh@gmx.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/consolemap.h | 1 | ||||
-rw-r--r-- | include/linux/kbd_diacr.h | 2 | ||||
-rw-r--r-- | include/linux/kd.h | 10 |
3 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/consolemap.h b/include/linux/consolemap.h index 06b2768c603f..e2bf7e5db39a 100644 --- a/include/linux/consolemap.h +++ b/include/linux/consolemap.h | |||
@@ -16,4 +16,5 @@ extern u16 inverse_translate(struct vc_data *conp, int glyph, int use_unicode); | |||
16 | extern unsigned short *set_translate(int m, struct vc_data *vc); | 16 | extern unsigned short *set_translate(int m, struct vc_data *vc); |
17 | extern int conv_uni_to_pc(struct vc_data *conp, long ucs); | 17 | extern int conv_uni_to_pc(struct vc_data *conp, long ucs); |
18 | extern u32 conv_8bit_to_uni(unsigned char c); | 18 | extern u32 conv_8bit_to_uni(unsigned char c); |
19 | extern int conv_uni_to_8bit(u32 uni); | ||
19 | void console_map_init(void); | 20 | void console_map_init(void); |
diff --git a/include/linux/kbd_diacr.h b/include/linux/kbd_diacr.h index 1c1a3ff0535b..7274ec68c246 100644 --- a/include/linux/kbd_diacr.h +++ b/include/linux/kbd_diacr.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _DIACR_H | 2 | #define _DIACR_H |
3 | #include <linux/kd.h> | 3 | #include <linux/kd.h> |
4 | 4 | ||
5 | extern struct kbdiacr accent_table[]; | 5 | extern struct kbdiacruc accent_table[]; |
6 | extern unsigned int accent_table_size; | 6 | extern unsigned int accent_table_size; |
7 | 7 | ||
8 | #endif /* _DIACR_H */ | 8 | #endif /* _DIACR_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 { | |||
125 | #define KDGKBDIACR 0x4B4A /* read kernel accent table */ | 125 | #define KDGKBDIACR 0x4B4A /* read kernel accent table */ |
126 | #define KDSKBDIACR 0x4B4B /* write kernel accent table */ | 126 | #define KDSKBDIACR 0x4B4B /* write kernel accent table */ |
127 | 127 | ||
128 | struct kbdiacruc { | ||
129 | __u32 diacr, base, result; | ||
130 | }; | ||
131 | struct kbdiacrsuc { | ||
132 | unsigned int kb_cnt; /* number of entries in following array */ | ||
133 | struct kbdiacruc kbdiacruc[256]; /* MAX_DIACR from keyboard.h */ | ||
134 | }; | ||
135 | #define KDGKBDIACRUC 0x4BFA /* read kernel accent table - UCS */ | ||
136 | #define KDSKBDIACRUC 0x4BFB /* write kernel accent table - UCS */ | ||
137 | |||
128 | struct kbkeycode { | 138 | struct kbkeycode { |
129 | unsigned int scancode, keycode; | 139 | unsigned int scancode, keycode; |
130 | }; | 140 | }; |