[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: INT_STRLEN_BOUND and locales with *printf
From: |
Paul Eggert |
Subject: |
Re: INT_STRLEN_BOUND and locales with *printf |
Date: |
Tue, 08 Feb 2011 12:58:23 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 |
On 02/08/11 12:52, Ben Pfaff wrote:
> Thanks. I was assuming a plain format such as %d.
>
> Does your answer come from experience with many implementations,
> or is it based on knowledge of some document or standard?
Both. The relevant standard
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/fprintf.html>
says that plain %d is unaffected by locale. Locale does affect
radix characters and thousands grouping characters, but it doesn't
affect the minus sign or digits.