Re: Texinfo 7.2.90 build with mingw.org's MinGW: cleanups in Info

Patrice Dumas <[email protected]>
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
On Fri, Jan 16, 2026 at 10:24:19PM +0200, Eli Zaretskii wrote:
> > In C, yes, therefore I can do the code in C, but in Perl, the GetACP()
> > and GetConsoleOutputCP() obtained through Win32::API::More->Import call
> > returns a string, and I would need to know what this string is gonna be
> > for UTF-8.  I couldn't find that information on the internet.
> 
> I would expect the string to be the same in both cases: "65001" or
> maybe "CP65001".
> 
> If you send me a short Perl program, I can tell you what it produces
> on my Windows system.  Then we can be sure.

Here it is.  I couldn't really test it.

-- 
Pat
print_CP.pl (text/x-perl, 355 B)
#! /usr/bin/env perl

use strict;

use Win32::API;

Win32::API::More->Import("kernel32", "int GetACP()");
Win32::API::More->Import("kernel32", "int GetConsoleOutputCP()");

my $CP = GetACP();
if (defined($CP)) {
  print "GetACP: '$CP'\n";
}

my $ConsoleCP = GetConsoleOutputCP();
if (defined($ConsoleCP)) {
  print "GetConsoleOutputCP: '$ConsoleCP'\n";
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.