15 setlocale (LC_ALL, "");
16 wprintf (L"locale = %s\n", setlocale (LC_CTYPE, NULL));
18 wct = wctype ("jhira");
20 error (EXIT_FAILURE, 0, "jhira: no such character class");
22 if (fgetws (buf, sizeof (buf) / sizeof (buf[0]), stdin) != NULL)
26 wprintf (L"buf[] = \"%ls\"\n", buf);
30 for (n = 0; buf[n] != L'\0'; ++n)
32 wprintf (L"jhira(U%04lx = %lc) = %d\n", (long) buf[n], buf[n],
33 iswctype (buf[n], wct));
34 result |= ((buf[n] < 0xff && iswctype (buf[n], wct))
35 || (buf[n] > 0xff && !iswctype (buf[n], wct)));