From: Stephan Bosch Date: Sat, 22 Nov 2025 17:02:50 +0000 (+0100) Subject: lib: unicode-ucd-compile.py - Use write_tables_c_cpd() also for codepoint defaults X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f4b5650c002e68e66e394ab2a4dae2234b021a9;p=thirdparty%2Fdovecot%2Fcore.git lib: unicode-ucd-compile.py - Use write_tables_c_cpd() also for codepoint defaults --- diff --git a/src/lib/unicode-ucd-compile.py b/src/lib/unicode-ucd-compile.py index c3ee3056e4..d7f607f8c5 100755 --- a/src/lib/unicode-ucd-compile.py +++ b/src/lib/unicode-ucd-compile.py @@ -1197,10 +1197,13 @@ def write_tables_h(): def write_tables_c_cpd(cpd): - print( - "\t\t.general_category = %s," - % get_general_category_def(cpd.general_category) - ) + if hasattr(cpd, "general_category"): + print( + "\t\t.general_category = %s," + % get_general_category_def(cpd.general_category) + ) + else: + print("\t\t.general_category = UNICODE_GENERAL_CATEGORY_CN,") if ( hasattr(cpd, "canonical_combining_class") and cpd.canonical_combining_class > 0 @@ -1389,13 +1392,8 @@ def write_tables_c(): for cpd in ud_codepoints_defaults: print("\t{ // [%04X] " % n) n = n + 1 - if hasattr(cpd, "general_category"): - print( - "\t\t.general_category = %s," - % get_general_category_def(cpd.general_category) - ) - else: - print("\t\t.general_category = UNICODE_GENERAL_CATEGORY_CN,") + + write_tables_c_cpd(cpd) print("\t},") for cpr in ud_codepoints: cpd = cpr.data