Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inappropriate widths for Hangul Jamo #20

Closed
robert-ross opened this issue Jul 28, 2019 · 0 comments
Closed

Inappropriate widths for Hangul Jamo #20

robert-ross opened this issue Jul 28, 2019 · 0 comments

Comments

@robert-ross
Copy link

According to the seminal definition of wcwidth,

Hangul Jamo medial vowels and final consonants (U+1160-U+11FF) have a column width of 0.

Kuhn's implementation is old but this rule is still widely used today, e.g., in wcwidth from glibc for UTF-8 locales as demonstrated by

setlocale(LC_CTYPE, "en_US.utf8");
printf("%d\n", wcwidth(0x1160));

After Kuhn's implementation, Unicode added more medial vowels (U+D7B0-U+D7C6) and final consonants (U+D7CB-U+D7FB) which should also have zero width. To avoid differences between cat and less displays in xterm, I added {0x1160, 0x11ff}, {0xd7b0, 0xd7c6}, and {0xd7cb, 0xd7fb} to compose.uni after rm compose.uni; make -f Makefile.aut compose.uni but before make. This worked well so please consider making this change or something cleaner.

@gwsw gwsw closed this as completed in cae21f8 Aug 1, 2019
pehjota added a commit to pehjota/less that referenced this issue Apr 18, 2024
This reverts commit f229eab.

This change causes the following test failures:

    TEST utf8-2.txt.lt
    DIFF utf8-2.txt on cmd gwsw#20 (. a)
    FAIL: utf8-2.txt (20 steps)
    ERR  status 256 from /<<PKGBUILDDIR>>/lesstest/lesstest  -s '/<<PKGBUILDDIR>>/lesstest/lt_screen' -t '/<<PKGBUILDDIR>>/lesstest/lt/utf8-2.txt.lt' '/<<PKGBUILDDIR>>/less'
    TEST chinese1.lt
    DIFF chinese1 on cmd gwsw#29 (. a)
    FAIL: chinese1 (29 steps)
    ERR  status 256 from /<<PKGBUILDDIR>>/lesstest/lesstest  -s '/<<PKGBUILDDIR>>/lesstest/lt_screen' -t '/<<PKGBUILDDIR>>/lesstest/lt/chinese1.lt' '/<<PKGBUILDDIR>>/less'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant