[PATCH v4 2/3] update-unicode.sh: strip the plane offsets from the double_width[] table
- From
Beat Bolli <dev+git@drbeat.li>
- Date
- Dec 3, 2016, 21:00 UTC
- Message-ID
- <1480798849-13907-2-git-send-email-dev+git@drbeat.li>
- 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