- changed status to open
citrus_euc's wcrtomb(3) never returns EILSEQ.
Issue #52
closed
here is test case.
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <locale.h>
#include <string.h>
#include <wchar.h>
int
main(void)
{
size_t ret;
mbstate_t st;
char b[MB_LEN_MAX];
setlocale(LC_CTYPE, "ja_JP.eucJP");
memset(&st, 0, sizeof(st));
/* wchar_t is opaque object and implementation defined.
* citrus's eucJP locale's wchar_t mapping is:
*
* GL: US-ASCII 00000000 00000000 00000000 0xxxxxxx
* GR: JIS X 0208 00000000 00000000 1xxxxxxx 1xxxxxxx
* SS2: JIS X 0201 KANA 00000000 00000000 00000000 1xxxxxxx
* SS3: JIS X 0212 00000000 00000000 1xxxxxxx 0xxxxxxx
*
* so 0xffffffff(11111111 11111111 11111111 11111111) should be
* EISEQ, but not.
*/
ret = wcrtomb(b, (wchar_t)0xffffffff, &st);
assert(ret == (size_t)-1);
assert(errno == EILSEQ);
}
Comments (3)
-
reporter -
reporter - changed status to resolved
BUGFIX: Issue
#52-- citrus_euc's wcrtomb(3) never returns EILSEQ.→ <<cset c2ea3e7f89da>>
-
reporter - edited description
- changed status to closed
- Log in to comment