The INT_STRLEN_BOUND macro in Gnulib's intprops.h calculates the maximum number of bytes in a formatted integer, on the basis that the minus sign and each digit will occupy one byte. If *printf is used for formatting integers, is this a good assumption outside of the C locale? I do not see anything in the C or POSIX standards that say whether or not %d and similar format specifiers are allowed to use localized sign and digits.
It looks to me that glibc only localizes the results of integer format specifiers if the glibc-specific "I" flag is present. I don't know whether that is true in every libc. Thanks, Ben. -- Ben Pfaff http://benpfaff.org
