[Top][All Lists]

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

Re: [PATCH] Use UTF-8 active code page for Windows host.

From: Costas Argyris
Subject: Re: [PATCH] Use UTF-8 active code page for Windows host.
Date: Sun, 23 Apr 2023 00:27:59 +0100


This is the latest patch based on the agreed remaining items:

> 1) Make build optional with respect to UTF-8:    If windres is available,
> use it, if not, just build without UTF-8 support (current behavior).
> 2) Implement Paul's suggestion above to avoid having an empty target
> if HAVE_WINDRES is not set.
> 3) Add active code page used in "make --version" output, for Windows.
> Potentially also check Windows version.
> 4) Can we officially forget about bringing the UTF-8 changes to Basic.mk?
> As I have said before, I haven't managed to build using these Makefiles.
> Actually, having the code page output by --version would greatly help with
> this as well - if one built GNU Make using Basic.mk, they wouldn't get
> UTF-8 support but this would still be readable in --version so no surprises.

I remind that we are waiting for Paul's decision on whether
we can forget about Basic.mk and the like regarding UTF-8.
Note how the info added to --version actually helps with this.

For the rest of the items 1-3, I made the changes and tested building
using both build_w32.bat (all 3 compilers: VS, GCC and TCC) and
the Unix configury method (GCC).

The case of 'no windres' was simulated by simply temporarily
renaming the 'windres' binary to 'windres1' so that it wasn't found,
and Make was indeed built without the UTF-8 resource (and
--version correctly reported the local code page instead of UTF-8).

I also tried running a UTF-8 Make in a version of Windows earlier
than 1903 and the --version output returned the local code page
(not UTF-8), which is what Eli was expecting, so no surprises there.

Please let me know what you think about this patch.


On Tue, 11 Apr 2023 at 14:56, Eli Zaretskii <eliz@gnu.org> wrote:
> From: Costas Argyris <costas.argyris@gmail.com>
> Date: Tue, 11 Apr 2023 14:50:53 +0100
> Cc: bug-make@gnu.org, psmith@gnu.org
> > AFAIK, GetACP can never return UTF-8, except if the program was
> > compiled with those resources.
> In the scenario I am describing, Make was compiled with the resource,
> so GetACP should return UTF-8 on the one hand.    On the other hand
> though, since Make is running in Windows version < 1903, it shouldn't
> return UTF-8 because this functionality is not supported in that version.

That is what will happen, AFAIK.

Attachment: 0001-Add-UTF-8-resource-when-building-for-Windows-host.patch
Description: Binary data

reply via email to

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