commit:     fe58127cc3b561edfaa547dd4d20d8330ffc7c5c
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Sat Aug  9 20:06:32 2025 +0000
Commit:     Kerin Millar <kfm <AT> plushkava <DOT> net>
CommitDate: Sat Aug  9 20:15:57 2025 +0000
URL:        https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=fe58127c

locale.gen.5: Correct the locale name synopsis per XPG Issue 4

Currently, Section 7.6 of the glibc manual states that "most locale
names follow XPG syntax". In characteristic GNU fashion, it fails to
explain what XPG is or precisely which issue of the specification it is
referring to. It goes on to present the following locale name synopsis.

  language[_territory[.codeset]][@modifier]

Such is a valid synopsis for XPG3. But glibc does not observe the
conventions of XPG3. Instead, it observes the conventions of XPG4. That
is, the X/Open Common Applications Environment (CAE) Portability Guide
Issue 4 (XPG4) specification. As such, the synopsis should actually be
written as follows.

  language[_territory][.codeset][@modifier]

The difference is that all but the language portion of a locale name are
rendered optional by Issue 4. Indeed, the glibc manual goes on to
literally state that, "besides the first part, all of them are allowed
to be missing."

Though I cannot correct the glibc manual directly, I can correct the
locale.gen(5) man page. Do so by having it show the XPG4 synopsis.

Link: https://sourceware.org/glibc/manual/latest/html_node/Locale-Names.html
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>

 locale.gen.5 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/locale.gen.5 b/locale.gen.5
index 339d812..5a56e60 100644
--- a/locale.gen.5
+++ b/locale.gen.5
@@ -21,12 +21,12 @@ The definition of a <blank> character is that it is either 
the <tab> or <space>
 character.
 .SH "LOCALE NAMES"
 The GNU C Library employs a locale naming scheme that is based upon the X/Open
-Portability Guide (XPG). A \fIlocalename\fR is composed of between one and four
-parts.
+Common Applications Environment (CAE) Portability Guide Issue 4 (XPG4)
+specification. A \fIlocalename\fR is composed of between one and four parts.
 .P
 .RS
 .EX
-language[_territory[.codeset]][@modifier]
+language[_territory][.codeset][@modifier]
 .EE
 .RE
 .P

Reply via email to