This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients Alexander.Pyhalov, ezio.melotti, pitrou, r.david.murray, vstinner
Date 2013-12-22.14:37:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387723018.2302.5.camel@fsol>
In-reply-to <1387697465.43.0.214349351055.issue20049@psf.upfronthosting.co.za>
Content
> I've discussed this once more. 
> 
> >From islower man page:
> 
> RETURN VALUES
>      If the argument to any of the character handling  macros  is
>      not  in the domain of the function, the result is undefined.

This is not the wording of the POSIX spec:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/islower.html

"""The c argument is an int, the value of which the application shall
ensure is a character representable as an unsigned char or equal to the
value of the macro EOF."""

This means that any value between 0 and 255 ("representable as an
unsigned char") is a valid input for islower().

This would mean IllumOS deviates from the POSIX spec here. I would
suggest either fixing your libc's ctype.h implementation, and/or
patching your version of Python to workaround this issue.

Note the ISO C99 standard has the same wording as POSIX:

"""The header <ctype.h> declares several functions useful for
classifying and mapping characters. In all cases the argument is an int,
the value of which shall be representable as an unsigned char or shall
equal the value of the macro EOF."""

(Note also that under Linux and most likely other Unices,
string.lowercase and string.uppercase work fine under a UTF-8 locale)
History
Date User Action Args
2013-12-22 14:37:02pitrousetrecipients: + pitrou, vstinner, ezio.melotti, r.david.murray, Alexander.Pyhalov
2013-12-22 14:37:02pitroulinkissue20049 messages
2013-12-22 14:37:01pitroucreate