vt: introduce gen_ucs_recompose.py to create ucs_recompose.c
authorNicolas Pitre <npitre@baylibre.com>
Thu, 10 Apr 2025 01:13:58 +0000 (21:13 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Apr 2025 14:55:55 +0000 (16:55 +0200)
commitf2347b0cdf65e614732c2307863c95304f72d9d9
tree77740cbabaf06d388b69b5361ea5a0123dfd1848
parent3a1ab63aa05b4736a7d30ae0a769385662f13def
vt: introduce gen_ucs_recompose.py to create ucs_recompose.c

The generated code includes a table that maps base character + combining
mark pairs to their precomposed equivalents using Python's unicodedata
module. It also provides the ucs_recompose() function to query that
table.

The default script behavior is to create a table with most commonly used
Latin, Greek, and Cyrillic recomposition pairs only. It is much smaller
than the table with all possible recomposition pairs (71 entries vs 1000
entries). But if one needs/wants the full table then simply running the
script with the --full argument will generate it.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Link: https://lore.kernel.org/r/20250410011839.64418-7-nico@fluxnic.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/gen_ucs_recompose.py [new file with mode: 0755]