The following issue has been SUBMITTED. 
Reported By:                Florian Weimer
Assigned To:                
Project:                    1003.1(2013)/Issue7+TC1
Issue ID:                   1078
Category:                   System Interfaces
Type:                       Clarification Requested
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       Florian Weimer 
Organization:               Red Hat 
User Reference:              
Section:                    isdigt, isxdigit 
Page Number:                unknown 
Line Number:                unknown 
Interp Status:              --- 
Final Accepted Text:         
Date Submitted:             2016-09-16 17:54 UTC
Last Modified:              2016-09-16 17:54 UTC
Summary:                    isdigit, isxdigit locale dependance
ISO C99 and C11 are very explicit about the set of decimal digits and
hexadecimal digits (0123456789 and 0123456789ABCDEFabcdef).  There is no
expectation that the result of these functions is locale-dependent, unlike
isalpha (for example).  Any locale-dependence of the results would thus
violate C99/C11 semantics.

isalnum is affected by this as well because it is specified as the union of
isalpha and isdigit in IS C.  This is probably a defect in ISO C.
Desired Action: 
“The isdigit function returns true if the argument refers to a character
in the range from '0' to '9' (inclusive.”

“The isxdigit function returns true if the argument is a decimal digit
according to the isdigit function, or if the argument refers to one of the
characters 'A', 'B', 'C', 'D', 'E', 'F', 'a', 'b', 'c', 'd', 'e', 'f'.”

If so desired, any restrictions on the digit and xdigit character classes
could be lifted, and applications could query them using the isdigit_l and
isxdigit_l functions.

Issue History 
Date Modified    Username       Field                    Change               
2016-09-16 17:54 Florian Weimer New Issue                                    
2016-09-16 17:54 Florian Weimer Name                      => Florian Weimer  
2016-09-16 17:54 Florian Weimer Organization              => Red Hat         
2016-09-16 17:54 Florian Weimer Section                   => isdigt, isxdigit
2016-09-16 17:54 Florian Weimer Page Number               => unknown         
2016-09-16 17:54 Florian Weimer Line Number               => unknown         

Reply via email to