mblen(3) should not set errno=EILSEQ when impomplete character parsed.

Issue #58 closed
Takehiko NOZAKI repo owner created an issue

following testcase may fail:

#include <stdlib.h>
#include <wchar.h>
#include <locale.h>
#include <string.h>
#include <errno.h>

int
main(void)
{
        setlocale(LC_CTYPE, "ja_JP.UTF-8");
        errno = 0;
        assert(mblen("\xe0", 1) == -1);
        assert(errno == 0);
}

Solaris, glibc2, {Open,Free}BSD works fine.

Comments (3)

  1. Log in to comment