This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: iostream changes locale to format a number
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: stephenw at cryptocard dot com
- Cc: tskoba at mte dot biglobe dot ne dot jp, libstdc++ at gcc dot gnu dot org
- Date: Fri, 03 May 2002 15:24:21 +0200
- Subject: Re: iostream changes locale to format a number
- References: <3CD27E4D.8010905@unitus.it> <3CD282D4.4000107@unitus.it> <20020503131051306.AAA1432@ns2.goodmedia.com@there>
Stephen M.Webb wrote:
>On May 3, 2002 08:30 am, Paolo Carlini wrote:
>
>
>>Paolo Carlini wrote:
>>
>>
>>>Are you willing to contribute a patch against the current mainline
>>>libstdc++-v3 sources for public discussion (that setlocale ...
>>>setlocale pattern is present in quite a few different places) ?
>>>
>>>
>>Let me point out, however, that, assuming your analysis is correct (I
>>believe is) the solution cannot be as simple as you seems to assume:
>>the string returned by the first setlocale must be saved!
>>
>>
>That's not correct. The first call with an empty string will set the
>global locale object to that of the operating environment (eg. the
>value of the LC_ALL environment variable in a POSIX environment).
>
>The remaining calls, with a NULL locale value, are simply queries.
>
/What/ exactly do you believe it's not correct? glibc2.2.5 docs? Takeshi
analysis? Do you believe that Takeshi testcase must result in the
reported behaviour, with a "C" locale at the end of program?
:-O
(by the way, sad to say ;-), but icc DTRT)
Paolo.