bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Patch: Fix printing mutibyte characters as unprintable ch


From: Eli Zaretskii
Subject: Re: [Bug-wget] Patch: Fix printing mutibyte characters as unprintable characters on Windows
Date: Sat, 11 Nov 2017 12:06:35 +0200

> From: "YX Hao" <address@hidden>
> Cc: <address@hidden>
> Date: Sun, 5 Nov 2017 23:01:22 +0800
> 
> And I can tell you that 'GetConsoleOutputCP' returns the codepage as command
> 'chcp'. It is right. The gnu 'vsnprintf' doesn't work right with 'setlocale'
> omitted.

I guess this means wget needs to call 'setlocale' with the right
codepage even when NLS is not enabled, because the naïve belief that
the default C locale will show n on-ASCII characters correctly is
false on Windows, especially in multibyte locales.  The MSDN
documentation of 'setlocale' confirms that by saying:

  The C locale assumes that all char data types are 1 byte and that
  their value is always less than 256.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]