This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
PR libc/4501: Invalid, not a bug
- From: Petter Reinholdtsen <pere at hungry dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: Tue, 15 Apr 2003 22:27:17 +0200
- Subject: PR libc/4501: Invalid, not a bug
I've emailed with the reporter of problem report 4501, "isprint
returns FALSE for a 8 bit char with european locale", and explained
that he need to call setlocale(LC_ALL, "") to enable locale support in
isprint(). An updated example worked just fine on his machine:
#include <ctype.h>
#include <locale.h>
int main()
{
char *str = "é";
setlocale(LC_ALL, "");
if (isprint(str[0]))
printf(" isprint\n");
else
printf(" no\n");
}
His real problem was trying to get strings(1) to understand 8-bit
characters. I suggested he took that problem to the coreutils
developers.
I believe the bug can be closed as invalid, or whatever code is used
in gnats.