public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "bruno at clisp dot org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/29777] New: LANGUAGE interpretation in C.UTF-8 locale is not like in C locale
Date: Sat, 12 Nov 2022 01:35:40 +0000	[thread overview]
Message-ID: <bug-29777-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=29777

            Bug ID: 29777
           Summary: LANGUAGE interpretation in C.UTF-8 locale is not like
                    in C locale
           Product: glibc
           Version: 2.35
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: bruno at clisp dot org
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

The C.UTF-8 locale was introduced in glibc 2.35, see
https://sourceware.org/pipermail/libc-announce/2022/000033.html

Unfortunately, it is undocumented. As a fallback, I assume that the wiki page
https://sourceware.org/glibc/wiki/Proposals/C.UTF-8 , which carries the marker
"Merged for glibc 2.35", describes the intention.

This wiki page states "Setting LC_ALL=C.UTF-8 will ignore LANGUAGE just like it
does with LC_ALL=C. See guess_category_value() in intl/dcigettext.c and how it
checks "C" for more details."

But this is not how it behaves.

How to reproduce:
In a Fedora 36 installation:

$ /lib64/libc.so.6 --version

tells me that I'm using glibc 2.35.

$ locale -a | grep ^C
C
C.utf8

This shows that the C.UTF-8 locale is installed.

$ LC_ALL=C.UTF-8 LANGUAGE=fr ls --help
shows a help text in French, taken from
/usr/share/locale/fr/LC_MESSAGES/coreutils.mo .

But the expected output, per the wiki page above, is the English (untranslated)
help text.

The attached patch fixes it for me, when applied to gettext's libintl library,
with an 'ls' binary that links against libintl. I expect this patch will work
in the same way from within glibc.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2022-11-12  1:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-12  1:35 bruno at clisp dot org [this message]
2022-11-12  1:40 ` [Bug libc/29777] " bruno at clisp dot org
2022-11-12  5:55 ` sam at gentoo dot org
2022-11-14 13:01 ` [Bug locale/29777] " fweimer at redhat dot com
2023-09-10 19:28 ` bruno at clisp dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29777-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).