Update display widths as part of updating Unicode
John Naylor <john.naylor@postgresql.org>
Update display widths as part of updating Unicode The hardcoded "wide character" set in ucs_wcwidth() was last updated around the Unicode 5.0 era. This led to misalignment when printing emojis and other codepoints that have since been designated wide or full-width. To fix and keep up to date, extend update-unicode to download the list of wide and full-width codepoints from the offical sources. In passing, remove some comments about non-spacing characters that haven't been accurate since we removed the former hardcoded logic. Jacob Champion Reported and reviewed by Pavel Stehule Discussion: https://www.postgresql.org/message-id/flat/CAFj8pRCeX21O69YHxmykYySYyprZAqrKWWg0KoGKdjgqcGyygg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/common/unicode/generate-unicode_east_asian_fw_table.pl | added | +76 −0 |
| src/common/unicode/.gitignore | modified | +1 −0 |
| src/common/unicode/Makefile | modified | +6 −3 |
| src/common/wchar.c | modified | +17 −24 |
| src/include/common/unicode_east_asian_fw_table.h | added | +120 −0 |
Discussion
- badly calculated width of emoji in psql 37 messages · 2021-04-02 → 2021-08-26