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/17390] New: mbtowc would fail to process Big5 multibyte string


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

            Bug ID: 17390
           Summary: mbtowc would fail to process Big5 multibyte string
           Product: glibc
           Version: 2.19
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: franklin at goodhorse dot idv.tw
                CC: drepper.fsp at gmail dot com

For some Big5 Chinese multibyte word mbtowc would return EILSEQ. For example,

int main()
{
    char p[10];
    wchar_t pwc[60];
    int ret;

    p[0] = 0xb0;
    p[1] = 0xea;
    p[2] = 0xb2;
    p[3] = 0xd5;
    p[4] = 0;

    ret = mbtowc(pwc, p, 60);
    printf("ret=%d, errno=%d\n", ret, errno);

    return ret;
}

$ ./testmb 
ret=-1, errno=84

0xb0ea is å in Big5 and 0xb2d5 is ç in Big5, but they would return fail with
errno 84.

This bug affects libarchive which would fail to extract zip file with Big5
filename.

-- 
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]