Following program returns incorrect values {-1,0,-1} on HPUX whereas if I run the same program on Linux it works correctly for the locale "de_DE.iso885915@euro". Is there any issue with HPUX wcwidth, iswprint and wcswidth.
int main ()
{
wchar_t str[2];
wchar_t ch = 8364; /* Euro sign */
str[0] = ch;
str[1] = '\0';
/* Locale set to de_DE.iso885915@euro before running this program */
setlocale(LC_ALL, "");
printf ("%d\n", wcwidth(ch));
printf ("%d\n", iswprint(ch));
printf ("%d\n", wcswidth(str, 2));
return 0;
}