This is the mail archive of the glibc-bugs@sourceware.org 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]

[Bug libc/19242] New: strtol incorrect in Turkish locales


https://sourceware.org/bugzilla/show_bug.cgi?id=19242

            Bug ID: 19242
           Summary: strtol incorrect in Turkish locales
           Product: glibc
           Version: 2.22
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: jsm28 at gcc dot gnu.org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

The implementations of strtol and related functions use locale-specific
conversions to upper case before determining whether a character is a valid
letter in the argument.  This means that in Turkish locales such as tr_TR.UTF-8
and tr_TR.ISO-8859-9, "i" is interpreted as not being a valid number, when if
the base passed to strtol is 19 or more it should be interpreted as the number
18.

ISO C explicitly says "The letters from a (or A) through z (or Z) are ascribed
the values 10 through 35", so clearly intends the standard ASCII letters
(otherwise you wouldn't generally have exactly 26 letters to ascribe such
values) (whereas white-space must be identified according to the locale).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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