guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: doc: Mention the "normalized codeset" used in locale names.


From: Ludovic Courtès
Subject: 02/03: doc: Mention the "normalized codeset" used in locale names.
Date: Sat, 29 Aug 2015 21:57:08 +0000

civodul pushed a commit to branch master
in repository guix.

commit b26365186045530eadb5027087a37ca1a440aee9
Author: Ludovic Courtès <address@hidden>
Date:   Sat Aug 29 23:37:33 2015 +0200

    doc: Mention the "normalized codeset" used in locale names.
    
    * doc/guix.texi (Locales): Introduce "codeset".
      <%default-locale-definitions>: Mention the "normalized codeset", with
      an xref to libc's manual.
    * gnu/system/locale.scm (%default-locale-definitions)[utf8-locale]:
      Mention the "normalized codeset" in a comment.
---
 doc/guix.texi         |   14 +++++++++++---
 gnu/system/locale.scm |    2 ++
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index f69440c..5a9ebc9 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -5477,7 +5477,7 @@ special-case and is automatically added whether or not it 
is specified.
 A @dfn{locale} defines cultural conventions for a particular language
 and region of the world (@pxref{Locales,,, libc, The GNU C Library
 Reference Manual}).  Each locale has a name that typically has the form
address@hidden@address@hidden@var{charset}}---e.g.,
address@hidden@address@hidden@var{codeset}}---e.g.,
 @code{fr_LU.utf8} designates the locale for the French language, with
 cultural conventions from Luxembourg, and using the UTF-8 encoding.
 
@@ -5538,9 +5538,17 @@ IANA}.
 @end deftp
 
 @defvr {Scheme Variable} %default-locale-definitions
-An arbitrary list of commonly used locales, used as the default value of
-the @code{locale-definitions} field of @code{operating-system}
+An arbitrary list of commonly used UTF-8 locales, used as the default
+value of the @code{locale-definitions} field of @code{operating-system}
 declarations.
+
address@hidden locale name
address@hidden normalized codeset in locale names
+These locale definitions use the @dfn{normalized codeset} for the part
+that follows the dot in the name (@pxref{Using gettextized software,
+normalized codeset,, libc, The GNU C Library Reference Manual}).  So for
+instance it has @code{uk_UA.utf8} but @emph{not}, say,
address@hidden
 @end defvr
 
 @node Services
diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm
index be9abcb..393dd42 100644
--- a/gnu/system/locale.scm
+++ b/gnu/system/locale.scm
@@ -83,6 +83,8 @@
   (letrec-syntax ((utf8-locale (syntax-rules ()
                                  ((_ name*)
                                   (locale-definition
+                                   ;; Note: We choose "utf8", which is the
+                                   ;; "normalized codeset".
                                    (name (string-append name* ".utf8"))
                                    (source name*)
                                    (charset "UTF-8")))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]