Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: RFC PATCH: stop lowercasing messages from strerror
- X-seq: zsh-workers 55289
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: RFC PATCH: stop lowercasing messages from strerror
- Date: Thu, 19 Nov 2026 21:42:54 +0000
- Archived-at: <https://zsh.org/workers/55289>
- Dkim2-signature: i=1; m=1; t=1795124718; d=daniel.shahaf.name; mf=PGQuc0BkYW5pZWwuc2hhaGFmLm5hbWU+; rt=PHpzaC13b3JrZXJzQHpzaC5vcmc+; s=fm2:rsa-sha256:oZJBKq0yYn4RSi7hSkEvjW6yE/zYttt45KlDH3X27qTXPdF pMKCZKf/kehdkCROuYkG9GKk0z+ISmqrYWsACH7t11u/8Z+GvsXgxpZjT69cdNgo kGvJwEbAFW0TNFDMIjrphZkMB2aEX6SSQqdbBoOEBxuBoYNCdUINLsmSVJXtHQwv hBx54FRVtrCnAkRfU1ne6ch8Uzv+3oIqP3h8mawhckawMvmDpa0t55N9engiBeLt 6D5gCV9gQa4XgOyHYpSu93Z1XT0j9lzppQyZt0qrk5zHoLjmI9Omm+4ysEGhEU6P WdtD9YnUxArN2kxzV6GHLwj9Tz5rYgz2d1mRmFw==;
- Feedback-id: i425e4195:Fastmail
- In-reply-to: <CAHYJk3QLbRzsw3AOxazWufUch6YEJdPY0y=PZOUTqc0UZqfuOw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- Message-instance: m=1; h=sha256:McARoOSduh9Ybc6dF1s5mW7P8LdVaDBthiCmMWi2yjY=:2q1U0tolpit0uOzyBOC9nHI4iDiQgVvoWQ/T6k+moKA=;
- References: <1645687068.167019.1794909152720@mail.virginmedia.com> <20261117114933.22106-1-mikachu@gmail.com> <104b2c32-ee4a-4deb-8539-b4b05a2b8fc1@app.fastmail.com> <CAHYJk3QLbRzsw3AOxazWufUch6YEJdPY0y=PZOUTqc0UZqfuOw@mail.gmail.com>
Mikael Magnusson wrote on Thu, 19 Nov 2026 06:56 +00:00:
> On Wed, Nov 18, 2026 at 6:50 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>> Mikael Magnusson wrote on Tue, 17 Nov 2026 11:49 +00:00:
>> > Even if we decide to keep the lowercasing, it should probably at least
>> > be made to work on multibyte text, or perhaps we should just use
>> > strerror_l when it exists (since POSIX.1-2008 if my manpage is to be
>> > believed) with a "C" locale so that all error messages are in english,
>> > since our other messages aren't translated anyway?
>>
>> I would expect someone who runs with LC_MESSAGES=foo to prefer "some
>> messages are in foo and some are untranslated" to "all messages are untranslated".
>>
>> Besides, even programs that do localize their messages still print
>> unlocalized messages when a particular message hasn't been translated;
>> i.e., it's not unheard of to see a bit of English in the middle of an
>> otherwise-localized session.
>
> This was my original instinct, but then I got a bit unsure, thanks for
> reassuring me :). (I take it your overall view is the patch as I
> posted it is reasonable).
Yes, I think the patch as posted as reasonable.
Also, re-reading it, it occurs to me that the incumbent code accesses
«errmsg + 1» without checking whether «errmsg[0] != '\0'». That's undefined
behaviour.
"I once fixed UB and a typo in German at the same time." isn't a
sentence just anyone can say :-)
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author