The C11 spec for strtod()
seems to have a opening big enough for any size truck to drive through. It appears so open ended, I see no limitation.
§7.22.1.3 6 In other than the "C" locale, additional locale-specific subject sequence forms may be accepted.
For non- "standard C" locales, the isspace()
, decimal (radix) point, group separator, digits per group and sign seem to constitute the typical variants. But apparently there is no limit.
For fun experimented with 500+ locales using printf()
, sscanf()
, strftime()
and isspace()
.
All tested locales had a radix (decimal) point of '.'
or ','
, the same +/- sign, no digit grouping, and the expected 0-9.
strftime(... "%Y" ...)
did not use a digit separator over years 1000-99999.
sscanf("1,234.5", "%lf", ..
and sscanf("1.234,5", "%lf", ..
did not produce 1234.5 in any locale.
All int
values in the range 0 to 255 produced the same isspace()
results with the sometimes exception of 154 and 160.
Of course these test do not prove a limit to what may occur, but do represent a sample of possibilities.