On Sat, Jan 18, 2025 at 02:18:14PM +0200, Eli Zaretskii wrote: > > Date: Sat, 18 Jan 2025 12:11:13 +0100 > > From: Patrice Dumas <pertu...@free.fr> > > Cc: Eli Zaretskii <e...@gnu.org> > > > The header is <windows.h>. You don't need to load kernel32.dll or > import GetACP, as this will be taken care of when the program is > linked on Windows. The code is > > char locale_encoding[8]; > unsigned cp = GetACP (); > > locale_encoding = sprintf (locale_encoding, "cp%u", cp); > > (I don't know what does "if (defined($CP))" part do in Perl.)
It is a failsafe in case $CP could be undefined, looks like this is not possible in the C function. Thanks! -- Pat