From: Beat Bolli <dev+git@drbeat.li>
To: git@vger.kernel.org
Cc: Beat Bolli <dev+git@drbeat.li>
Subject: [PATCH v4 2/3] update-unicode.sh: strip the plane offsets from the double_width[] table
Date: Sat, 3 Dec 2016 22:00:48 +0100 [thread overview]
Message-ID: <1480798849-13907-2-git-send-email-dev+git@drbeat.li> (raw)
In-Reply-To: <1480798849-13907-1-git-send-email-dev+git@drbeat.li>
The function bisearch() in utf8.c does a pure binary search in
double_width. It does not care about the 17 plane offsets which
unicode/uniset/uniset prepends. Leaving the plane offsets in the table
may cause wrong results.
Filter out the plane offsets in update-unicode.sh.
Reviewed-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
---
update_unicode.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/update_unicode.sh b/update_unicode.sh
index 3c84270..4c1ec8d 100755
--- a/update_unicode.sh
+++ b/update_unicode.sh
@@ -30,7 +30,7 @@ fi &&
grep -v plane)
};
static const struct interval double_width[] = {
- $(uniset/uniset --32 eaw:F,W)
+ $(uniset/uniset --32 eaw:F,W | grep -v plane)
};
EOF
)
--
2.7.2
next prev parent reply other threads:[~2016-12-03 21:01 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-02 21:26 [PATCH 1/2] update-unicode.sh: automatically download newer definition files Beat Bolli
2016-12-02 21:26 ` [PATCH 2/2] unicode: update the tables to Unicode 9.0 Beat Bolli
2016-12-03 10:35 ` [PATCH 3/3] unicode_width.h: fix the double_width[] table Beat Bolli
2016-12-03 10:53 ` [PATCH v2 1/3] update-unicode.sh: automatically download newer definition files Beat Bolli
2016-12-03 10:53 ` [PATCH v2 2/3] unicode_width.h: update the tables to Unicode 9.0 Beat Bolli
2016-12-03 10:53 ` [PATCH v2 3/3] unicode_width.h: fix the double_width[] table Beat Bolli
2016-12-03 13:19 ` [PATCH v3 1/3] update-unicode.sh: automatically download newer definition files Beat Bolli
2016-12-03 13:19 ` [PATCH v3 2/3] update-unicode.sh: strip the plane offsets from the double_width[] table Beat Bolli
2016-12-03 13:19 ` [PATCH v3 3/3] unicode_width.h: update the tables to Unicode 9.0 Beat Bolli
2016-12-03 16:40 ` [PATCH v3 1/3] update-unicode.sh: automatically download newer definition files Torsten =?unknown-8bit?Q?B=C3=B6gershausen?=
2016-12-03 16:41 ` Beat Bolli
2016-12-03 21:00 ` [PATCH v4 " Beat Bolli
2016-12-03 21:00 ` Beat Bolli [this message]
2016-12-03 21:00 ` [PATCH v4 3/3] unicode_width.h: update the tables to Unicode 9.0 Beat Bolli
2016-12-04 7:58 ` [PATCH v4 1/3] update-unicode.sh: automatically download newer definition files Torsten Bögershausen
2016-12-05 20:31 ` Junio C Hamano
2016-12-07 0:17 ` Beat Bolli
2016-12-07 1:00 ` jbh
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1480798849-13907-2-git-send-email-dev+git@drbeat.li \
--to=dev+git@drbeat.li \
--cc=git@vger.kernel.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).