Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: RFC PATCH: stop lowercasing messages from strerror
- X-seq: zsh-workers 55288
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: RFC PATCH: stop lowercasing messages from strerror
- Date: Thu, 19 Nov 2026 07:56:21 +0100
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=VbFI87DiRDxInf1BKJD1rZYz83G0jqqYn49Vqj3JfvY=; fh=Tph3Nvi7JV+RLjY+il02lI77hTx+KXSmQL0dZmUp3Z8=; b=Q8PJ1Xp3MzO3q1QpSWXcx93ATEamy8JA5tKDRpP2j255PqjuPqqImTMqZ9EhVHsWCk kwfK/o2mO57pYWA1s8+tySFVS44xJG1VSjv1dYoVscrZVwxHwe3Dz/JkCmvozAysldCE wHfkGkzRYSo1h8hAf5zLnjpACVwh7gk8DxftXLwcnri76faDMktkl2pe0zxAANVGjpe6 EUmzaK8g2g7Jmec/2ePHym9GgxMyHG9NwafvxNJJ9bNH5tlFv+QQqQIMf46uwGo7mbkh xHtuM2XAf2lJTsL/KdelzbDVmVF6yhAP32A0jQWHRLh6L5MW1OAkIGnSD3YDUvyq+Eow eW3g==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1795071394; cv=none; d=google.com; s=arc-20260327; b=enpgHCBYNJubltnHDA7CEXcpEy2K5VCKVGbgz/Xi1NOKuPmSI9oDQKvMHl3jEH3J1a R0eBxDoUOFb1/JNLUJ2jJYaJ93MC4ou8z6TrYujCaKxh/47tQwuASjUpRhIF3PpIM4ry UPSbGW3BQ1xtzHVyacQnsKXWxn/ExTMyv8uUX/+d0rj8QvGwTFRIT2vZ0rQzur0mepKF Xe0zxHknFoOW++zZWhywvdYO2o1aR1MLRMEBzaNqvG8x0upQ80VnNV7KO8kBNnYBsV0Z Fh/JIgpaTxRBXniCqgraEJgvOR2SjSr9NFJUq0F3bnnMSowRqsDm8CESFvEeYFmg7G63 qqfw==
- Archived-at: <https://zsh.org/workers/55288>
- In-reply-to: <104b2c32-ee4a-4deb-8539-b4b05a2b8fc1@app.fastmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <1645687068.167019.1794909152720@mail.virginmedia.com> <20261117114933.22106-1-mikachu@gmail.com> <104b2c32-ee4a-4deb-8539-b4b05a2b8fc1@app.fastmail.com>
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:
> > Originally reported in debian bug 419233 and forwarded as workers/23274.
> >
> > ---
> >
> >> It's not a uniform standard in English, even taking away the technical
> >> issues (i.e. it's not simply a kludge in Bash), so from the language
> >> point of view I don't think there's any problem in changing it.
> >>
> >> The issue is likely to be people matching on error messages in tests ---
>
> Fair point. However, people having to update their tests is a one-time
> cost, and by incurring it we align zsh's behaviour from here on with
> most other tools' behaviour and, I therefore suspect, most people's
> expectations.
>
> Also, blindly lowercasing a word can change its meaning (e.g.,
> "Polish", "Bob", [whatever the codename of the latest Ubuntu is]), so we
> shouldn't do that.
>
> Also, this lowercasing can create misspellings in English too — e.g.,
> when the message starts with an acronym:
> .
> % errno -l | perl -anE 'say "@F" if $F[2] =~ /^[A-Z][A-Z]/'
> EDOTDOT 73 RFS specific error
> %
> .
> We shouldn't print "rFS specific error".
Right, this is presumably why the existing code special cases EIO :).
(Though a slightly less(?) fragile special case would be to check if
the second character is also uppercased).
> >> which could happen in other languages with Latin character sets, so
> >> specialising English isn't a fix. I have absolutely no idea how common
> >> this would turn out to be. I think we'd have to apply the patch and ask
> >> people to look for knock-on effects.
> >
> > Here's a patch against the current code, including adjustments for our
> > own tests, for reference.
> >
> > It would have been nice if strerror returned text in lower case, since
> > uppercasing is somewhat less problematic, but I suppose it's a bit late
> > to lobby for that.
> >
> > I also realized that my consistency argument somewhat falls on the fact
> > that every other error message in zsh is still printed in lower case :).
> >
>
> > 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).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author