about summary refs log tree commit diff
path: root/localedata/unicode-gen
diff options
context:
space:
mode:
authorMike FABIAN <mfabian@redhat.com>2020-06-16 08:29:40 +0200
committerMike FABIAN <mfabian@redhat.com>2020-06-26 09:54:43 +0200
commit6e540caa21616d5ec5511fafb22819204525138e (patch)
tree47cb8da2e88d1023bfd4f64b67e28a8eadc48189 /localedata/unicode-gen
parent1d21fb1061cbeb50414a8f371abb36548d90f150 (diff)
downloadglibc-6e540caa21616d5ec5511fafb22819204525138e.tar.gz
glibc-6e540caa21616d5ec5511fafb22819204525138e.tar.xz
glibc-6e540caa21616d5ec5511fafb22819204525138e.zip
Set width of JUNGSEONG/JONGSEONG characters from UD7B0 to UD7FB to 0 [BZ #26120]
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'localedata/unicode-gen')
-rwxr-xr-xlocaledata/unicode-gen/utf8_gen.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/localedata/unicode-gen/utf8_gen.py b/localedata/unicode-gen/utf8_gen.py
index 17b99ee88d..11c906b92f 100755
--- a/localedata/unicode-gen/utf8_gen.py
+++ b/localedata/unicode-gen/utf8_gen.py
@@ -258,7 +258,13 @@ def process_width(outfile, ulines, elines, plines):
         if key in width_dict:
             del width_dict[key] # default width is 1
     for key in list(range(0x1160, 0x1200)):
-        width_dict[key] = 0
+        # Hangul jungseong and jongseong:
+        if key in unicode_utils.UNICODE_ATTRIBUTES:
+            width_dict[key] = 0
+    for key in list(range(0xD7B0, 0xD800)):
+        # Hangul jungseong and jongseong:
+        if key in unicode_utils.UNICODE_ATTRIBUTES:
+            width_dict[key] = 0
     for key in list(range(0x3248, 0x3250)):
         # These are “A” which means we can decide whether to treat them
         # as “W” or “N” based on context:
@@ -327,6 +333,7 @@ if __name__ == "__main__":
         help='The Unicode version of the input files used.')
     ARGS = PARSER.parse_args()
 
+    unicode_utils.fill_attributes(ARGS.unicode_data_file)
     with open(ARGS.unicode_data_file, mode='r') as UNIDATA_FILE:
         UNICODE_DATA_LINES = UNIDATA_FILE.readlines()
     with open(ARGS.east_asian_with_file, mode='r') as EAST_ASIAN_WIDTH_FILE: