From edd258fd6b341ca9ec1a8cda4437c32e75f8eecc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@gnu.org>
Date: Wed, 10 Jul 2013 11:52:35 +0200
Subject: [PATCH] list-packages: Write out the HTML page as UTF-8.

* build-aux/list-packages.scm (list-packages): Install the "C" locale.
  Write out as UTF-8.
---
 build-aux/list-packages.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/build-aux/list-packages.scm b/build-aux/list-packages.scm
index cdefa1ba972..34839541ec0 100755
--- a/build-aux/list-packages.scm
+++ b/build-aux/list-packages.scm
@@ -107,6 +107,13 @@ (define (packages->sxml packages)
 (define (list-packages . args)
   "Return an HTML page listing all the packages found in the GNU distribution,
 with gnu.org server-side include and all that."
+  ;; Don't attempt to translate descriptions.
+  (setlocale LC_ALL "C")
+
+  ;; Output the page as UTF-8 since that's what the gnu.org server-side
+  ;; headers claim.
+  (set-port-encoding! (current-output-port) "UTF-8")
+
   (let ((packages (sort (fold-packages cons '())
                         (lambda (p1 p2)
                           (string<? (package-name p1) (package-name p2))))))
-- 
GitLab