Alain Bench <[EMAIL PROTECTED]> writes:

>> the setlocale invocation should look like this:
>
>     Hum... You dropped the fallback to ANSI when GetConsoleOutputCP()
> returns 0.

Ah, I didn't know it could return 0.  The code was based on your
description, which said "Call GetConsoleOutputCP(), get [for] example
850, build a string...".

> That's fine, if it's considered useless. But it could lead to
> a setlocale(LC_ALL, ".0"), with unknown behaviour.

It's easy enough to handle a 0 return code.  What should we use then?
Would "" be appropriate in that case?

>> Wget is calling setlocale(LC_ALL, "") only if HAVE_NLS is defined,
>> which is typically not the case on Windows, as HAVE_NLS implies
>> existence of gettext, textdomain, and bindtextdomain.
>
> Also utils.c:get_grouping_data() does setlocale(LC_NUMERIC, "")
> temporarily.

Only in Wget 1.10.  This code has been removed from the repository --
take a look at http://svn.dotsrc.org/repo/wget/trunk/src/utils.c .

> In fact it seems to me that all manipulations of a category alone,
> outside of LC_ALL, are calling for problems on this or that
> platform.

I agree, which is why I removed such fiddlings for the next release.
The original reasons for doing that (suspect in their own right) are
far outweighed by the potential problems.

Reply via email to