> From: Gavin Smith <gavinsmith0...@gmail.com> > Date: Tue, 4 Apr 2023 10:59:53 +0100 > Cc: Eli Zaretskii <e...@gnu.org>, bug-texinfo@gnu.org > > On Tue, Apr 04, 2023 at 09:35:07AM +0200, Arash Esbati wrote: > > Eli Zaretskii <e...@gnu.org> writes: > > > > > ??? What is your console output codepage set to? > > > > C:\>chcp > > Aktive Codepage: 850. > > The use of the codepage 850 instead of what 'locale' reports likely > comes from these lines in texi2any.pl: > > > if (!defined($locale_encoding) and $^O eq 'MSWin32') { > eval 'require Win32::API'; > if (!$@) { > Win32::API::More->Import("kernel32", "int GetACP()"); > my $CP = GetACP(); > if (defined($CP)) { > $locale_encoding = 'cp'.$CP; > } > } > }
I think it's the other way around: GetACP is likely to report codepage 1252, the ANSI codepage of Windows localized for Western Europe systems. Codepage 850, OTOH, is the _console_ codepage for those locales. (Yes, it's a mess.) Info makes a point to query the system about the console output codepage: char * rpl_nl_langinfo (nl_item item) { if (item == CODESET) { static char buf[100]; /* We need all the help we can get from GNU libiconv, so we request transliteration as well. */ sprintf (buf, "CP%u//TRANSLIT", GetConsoleOutputCP ()); <<<<<<<<<<<<<< return buf; } else return nl_langinfo (item); }