diff options
author | Thorsten Glaser <tg@mirbsd.de> | 2017-07-14 14:02:46 +0200 |
---|---|---|
committer | Mike FABIAN <mfabian@redhat.com> | 2017-08-17 11:06:08 +0200 |
commit | 267ee5d7ab57591a6b1bc2d2a010c88188427063 (patch) | |
tree | 442f2e3c6a5d8860cb916700c3a6294695b834a3 /localedata | |
parent | 41b6f0ce85d98c62739b04863e8c38a1f4154e80 (diff) | |
download | glibc-267ee5d7ab57591a6b1bc2d2a010c88188427063.tar.gz glibc-267ee5d7ab57591a6b1bc2d2a010c88188427063.tar.xz glibc-267ee5d7ab57591a6b1bc2d2a010c88188427063.zip |
Resolve some historically special cases of ambiguous width
[BZ #21750] * unicode-gen/utf8_gen.py (U+00AD): Set width to 1. * unicode-gen/utf8_gen.py (U+1160..U+11FF): Set width to 0. * unicode-gen/utf8_gen.py (U+3248..U+324F): Set width to 2. * unicode-gen/utf8_gen.py (U+4DC0..U+4DFF): Likewise.
Diffstat (limited to 'localedata')
-rwxr-xr-x | localedata/unicode-gen/utf8_gen.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/localedata/unicode-gen/utf8_gen.py b/localedata/unicode-gen/utf8_gen.py index 332751b35b..1563aa11d2 100755 --- a/localedata/unicode-gen/utf8_gen.py +++ b/localedata/unicode-gen/utf8_gen.py @@ -236,6 +236,18 @@ def process_width(outfile, ulines, elines): width_dict[int(fields[0], 16)] = unicode_utils.ucs_symbol( int(fields[0], 16)) + '\t0' + # handle special cases for compatibility + for key in list(range(0x1160, 0x1200)) + list(range(0x3248, 0x3250)) + \ + list(range(0x4DC0, 0x4E00)) + list((0x00AD,)): + if key in width_dict: + del width_dict[key] + width_dict[0x1160] = '{:s}...{:s}\t0'.format( + unicode_utils.ucs_symbol(0x1160), unicode_utils.ucs_symbol(0x11FF)) + width_dict[0x3248] = '{:s}...{:s}\t2'.format( + unicode_utils.ucs_symbol(0x3248), unicode_utils.ucs_symbol(0x324F)) + width_dict[0x4DC0] = '{:s}...{:s}\t2'.format( + unicode_utils.ucs_symbol(0x4DC0), unicode_utils.ucs_symbol(0x4DFF)) + for key in sorted(width_dict): outfile.write(width_dict[key]+'\n') |