This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/22744] New: wcwidth glibc issue for 0x2630 Unicode character


https://sourceware.org/bugzilla/show_bug.cgi?id=22744

            Bug ID: 22744
           Summary: wcwidth glibc issue for 0x2630 Unicode character
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: illia.sechin at bk dot ru
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

$ cat test.c

#include <stdio.h>
#include <wchar.h>
#include <utf8proc.h>
int main() {
    wint_t c = 0x2630;
    printf("wcwidth returns %d\n", wcwidth(c));
    printf("utf8proc_charwidth returns %d\n", utf8proc_charwidth(c));
    return 0;
}

$ ./test
wcwidth returns -1
utf8proc_charwidth returns 2

So glibc in wcwidth() should return 2 for 0x2630 Unicode character.
More info:
https://github.com/source-foundry/Hack/pull/236#issuecomment-345040104

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]