public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Mike Fabian <mfabian@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] localedata: unicode-gen: Remove redundant \s* from regexp, fix comments Date: Mon, 8 Jan 2024 14:53:41 +0000 (GMT) [thread overview] Message-ID: <20240108145341.783C33858284@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d333a2e0fb3a8045d2667847b8c99ee82a6bbdd2 commit d333a2e0fb3a8045d2667847b8c99ee82a6bbdd2 Author: Mike FABIAN <mfabian@redhat.com> Date: Mon Jan 8 10:05:13 2024 +0100 localedata: unicode-gen: Remove redundant \s* from regexp, fix comments Diff: --- localedata/charmaps/UTF-8 | 2 +- localedata/unicode-gen/utf8_gen.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/localedata/charmaps/UTF-8 b/localedata/charmaps/UTF-8 index 94f20d5e87..b545cc9b25 100644 --- a/localedata/charmaps/UTF-8 +++ b/localedata/charmaps/UTF-8 @@ -49858,7 +49858,7 @@ END CHARMAP % Character width according to Unicode 15.1.0. % - Default width is 1. % - Double-width characters have width 2; generated from -% "grep '^[^;]*;[WF]' EastAsianWidth.txt" +% "grep '^[^;]*;\s*[WF]' EastAsianWidth.txt" % - Non-spacing characters have width 0; generated from PropList.txt or % "grep '^[^;]*;[^;]*;[^;]*;[^;]*;NSM;' UnicodeData.txt" % - Format control characters have width 0; generated from diff --git a/localedata/unicode-gen/utf8_gen.py b/localedata/unicode-gen/utf8_gen.py index 5e77333bb4..f744e87ffc 100755 --- a/localedata/unicode-gen/utf8_gen.py +++ b/localedata/unicode-gen/utf8_gen.py @@ -204,7 +204,7 @@ def write_header_width(outfile, unicode_version): + '{:s}.\n'.format(unicode_version)) outfile.write('% - Default width is 1.\n') outfile.write('% - Double-width characters have width 2; generated from\n') - outfile.write('% "grep \'^[^;]*;[WF]\' EastAsianWidth.txt"\n') + outfile.write('% "grep \'^[^;]*;\\s*[WF]\' EastAsianWidth.txt"\n') outfile.write('% - Non-spacing characters have width 0; ' + 'generated from PropList.txt or\n') outfile.write('% "grep \'^[^;]*;[^;]*;[^;]*;[^;]*;NSM;\' ' @@ -339,8 +339,8 @@ if __name__ == "__main__": with open(ARGS.east_asian_with_file, mode='r') as EAST_ASIAN_WIDTH_FILE: EAST_ASIAN_WIDTH_LINES = [] for LINE in EAST_ASIAN_WIDTH_FILE: - # If characters from EastAasianWidth.txt which are from - # from reserved ranges (i.e. not yet assigned code points) + # If characters from EastAsianWidth.txt which are from + # reserved ranges (i.e. not yet assigned code points) # are added to the WIDTH section of the UTF-8 file, then # “make check” produces “Unknown Character” errors for # these code points because such unassigned code points @@ -350,7 +350,7 @@ if __name__ == "__main__": # the EastAsianWidth.txt file. if re.match(r'.*<reserved-.+>\.\.<reserved-.+>.*', LINE): continue - if re.match(r'^[^;]*;\s*[WF]\s*', LINE): + if re.match(r'^[^;]*;\s*[WF]', LINE): EAST_ASIAN_WIDTH_LINES.append(LINE.strip()) with open(ARGS.prop_list_file, mode='r') as PROP_LIST_FILE: PROP_LIST_LINES = []
reply other threads:[~2024-01-08 14:53 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240108145341.783C33858284@sourceware.org \ --to=mfabian@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).