Subject: Re: [PATCH v2 1/4] t4xxx: don't use iconv(1) without ICONV prereq

From: Patrick Steinhardt <[email-masked]>
Date: Tue, 17 Feb 2026 16:18:55 +0100

On Tue, Feb 17, 2026 at 03:48:19PM +0100, Christian Couder wrote:
> On Tue, Feb 17, 2026 at 2:58 PM Patrick Steinhardt <[email-masked]> wrote:
> >
> > We've got a couple of tests that all use the iconv(1) executable to
> > convert the encoding of a commit message. All of these tests are
> > prepared to handle a missing ICONV prereq, in which case they will
> > simply use UTF-8 encoding.
> >
> > But even if the ICONV prerequisite has failed we try to use the iconv(1)
> > executable. But it's not a safe to assume that the executable exists in
> 
> s/not a safe/not safe/
> 
> > that case. And besides that, it's also unnecessary to use iconv(1) in
> > the first place, as we would only use it to convert from UTF-8 to UTF-8,
> > which should be equivalent to a no-op.
> >
> > In fact, Git for Windows has recently (unintentionally) shipped a change
> > where the iconv(1) binary is not getting installed anymore [1]. And as
> > we use Git for Windows directly in MSVC+Meson jobs in GitLab CI this has
> > exposed the issue. The missing iconv(1) binary is considered a bug that
> > will be fixed in Git for Windows, but regardless of that it makes sense
> > to not assume the binary to always exist.
> >
> > Fix the issue and skip the call to iconv(1) in case the prerequisite is
> > not set. This makes tests work on systems that don't have iconv at all.
> 
> Nit: when reading this, it's not clear if this commit is enough to fix
> all the MSVC+Meson jobs in GitLab CI or only those related to the
> t4xxx tests.

Yeah, fair. I think this is an artifact of me lumping these two changes
together into a single commit. I'll split it up in v3 of this patch
series.

Thanks!

Patrick