From: Jiri Slaby <jirislaby@kernel.org>
To: Nicolas Pitre <nico@fluxnic.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nicolas Pitre <npitre@baylibre.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 07/13] vt: introduce gen_ucs_recompose_table.py to create ucs_recompose_table.h
Date: Wed, 16 Apr 2025 06:29:07 +0200 [thread overview]
Message-ID: <f39d8b9b-c160-40a3-80d0-62f880122f2b@kernel.org> (raw)
In-Reply-To: <20250415192212.33949-8-nico@fluxnic.net>
On 15. 04. 25, 21:17, Nicolas Pitre wrote:
> From: Nicolas Pitre <npitre@baylibre.com>
>
> The generated table maps base character + combining mark pairs to their
> precomposed equivalents using Python's unicodedata module.
>
> 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>
> ---
> drivers/tty/vt/gen_ucs_recompose_table.py | 255 ++++++++++++++++++++++
> 1 file changed, 255 insertions(+)
> create mode 100755 drivers/tty/vt/gen_ucs_recompose_table.py
>
> diff --git a/drivers/tty/vt/gen_ucs_recompose_table.py b/drivers/tty/vt/gen_ucs_recompose_table.py
> new file mode 100755
> index 0000000000..91e81fb1c9
> --- /dev/null
> +++ b/drivers/tty/vt/gen_ucs_recompose_table.py
> @@ -0,0 +1,255 @@
> +#!/usr/bin/env python3
...
> + # Generate implementation file
> + with open(out_file, 'w') as f:
> + f.write(f"""\
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * {out_file} - Unicode character recomposition
> + *
> + * Auto-generated by {this_file}{generation_mode}
> + *
> + * Unicode Version: {unicodedata.unidata_version}
> + *
> +{textwrap.fill(
> + f"This file contains a table with {table_description_detail}. " +
> + f"To generate a table with {alt_description_detail} instead, run:",
> + width=75, initial_indent=" * ", subsequent_indent=" * ")}
> + *
> + * python {this_file}{alternative_mode}
This should be python3. Or no 'python' at all -- I assume the script is
executable given "new file mode 100755".
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
--
js
suse labs
next prev parent reply other threads:[~2025-04-16 4:29 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 19:17 [PATCH v2 00/13] vt: implement proper Unicode handling Nicolas Pitre
2025-04-15 19:17 ` [PATCH v2 01/13] vt: minor cleanup to vc_translate_unicode() Nicolas Pitre
2025-04-16 3:41 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 02/13] vt: move unicode processing to a separate file Nicolas Pitre
2025-04-16 3:42 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 03/13] vt: properly support zero-width Unicode code points Nicolas Pitre
2025-04-16 3:45 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 04/13] vt: introduce gen_ucs_width_table.py to create ucs_width_table.h Nicolas Pitre
2025-04-16 4:14 ` Jiri Slaby
2025-04-16 4:19 ` Jiri Slaby
2025-04-16 13:21 ` Nicolas Pitre
2025-04-15 19:17 ` [PATCH v2 05/13] vt: create ucs_width_table.h with gen_ucs_width_table.py Nicolas Pitre
2025-04-16 4:20 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 06/13] vt: use new tables in ucs.c Nicolas Pitre
2025-04-16 4:22 ` Jiri Slaby
2025-04-17 8:30 ` kernel test robot
2025-04-15 19:17 ` [PATCH v2 07/13] vt: introduce gen_ucs_recompose_table.py to create ucs_recompose_table.h Nicolas Pitre
2025-04-16 4:29 ` Jiri Slaby [this message]
2025-04-16 13:17 ` Nicolas Pitre
2025-04-17 4:09 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 08/13] vt: create ucs_recompose_table.h with gen_ucs_recompose_table.py Nicolas Pitre
2025-04-16 5:05 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 09/13] vt: support Unicode recomposition Nicolas Pitre
2025-04-16 5:07 ` Jiri Slaby
2025-04-15 19:17 ` [PATCH v2 10/13] vt: pad double-width code points with a zero-width space Nicolas Pitre
2025-04-16 5:07 ` Jiri Slaby
2025-04-15 19:18 ` [PATCH v2 11/13] vt: remove zero-width-space handling from conv_uni_to_pc() Nicolas Pitre
2025-04-16 5:07 ` Jiri Slaby
2025-04-15 19:18 ` [PATCH v2 12/13] vt: update gen_ucs_width_table.py to make tables more space efficient Nicolas Pitre
2025-04-16 5:09 ` Jiri Slaby
2025-04-15 19:18 ` [PATCH v2 13/13] vt: refresh ucs_width_table.h and adjust code in ucs.c accordingly Nicolas Pitre
2025-04-16 5:12 ` Jiri Slaby
2025-04-16 13:09 ` Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f39d8b9b-c160-40a3-80d0-62f880122f2b@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nico@fluxnic.net \
--cc=npitre@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox