summaryrefslogtreecommitdiff
path: root/gnu/installer/locale.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/installer/locale.scm')
-rw-r--r--gnu/installer/locale.scm19
1 files changed, 1 insertions, 18 deletions
diff --git a/gnu/installer/locale.scm b/gnu/installer/locale.scm
index 2ee5eecd96..13f3a1e881 100644
--- a/gnu/installer/locale.scm
+++ b/gnu/installer/locale.scm
@@ -19,6 +19,7 @@
(define-module (gnu installer locale)
#:use-module (gnu installer utils)
+ #:use-module ((gnu build locale) #:select (normalize-codeset))
#:use-module (guix records)
#:use-module (json)
#:use-module (srfi srfi-1)
@@ -71,24 +72,6 @@ optionally, CODESET."
(codeset . ,(or codeset (match:substring matches 5)))
(modifier . ,(match:substring matches 7)))))
-(define (normalize-codeset codeset)
- "Compute the \"normalized\" variant of CODESET."
- ;; info "(libc) Using gettextized software", for the algorithm used to
- ;; compute the normalized codeset.
- (letrec-syntax ((-> (syntax-rules ()
- ((_ proc value)
- (proc value))
- ((_ proc rest ...)
- (proc (-> rest ...))))))
- (-> (lambda (str)
- (if (string-every char-set:digit str)
- (string-append "iso" str)
- str))
- string-downcase
- (lambda (str)
- (string-filter char-set:letter+digit str))
- codeset)))
-
(define (locale->locale-string locale)
"Reverse operation of locale-string->locale."
(let ((language (locale-language locale))