This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]