summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-09-12 14:05:45 +0200
committerLudovic Courtès <ludo@gnu.org>2015-09-12 14:05:45 +0200
commit2cad18a8891e741615d1d9260969fca4a73424d8 (patch)
tree98e856c14d1cfecd9695793dc873a8abf838ae7a
parentdd5c9902adaacc6240085149ed10b8af7f511f6b (diff)
downloadguix-artwork-2cad18a8891e741615d1d9260969fca4a73424d8.tar
guix-artwork-2cad18a8891e741615d1d9260969fca4a73424d8.tar.gz
website: packages: Correctly handle Unicode strings in descriptions.
* website/www/packages.scm (package->sxml)[package-description-shtml]: Wrap in 'with-fluids'.
-rw-r--r--website/www/packages.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/website/www/packages.scm b/website/www/packages.scm
index fe4fb2b..3e4097f 100644
--- a/website/www/packages.scm
+++ b/website/www/packages.scm
@@ -175,8 +175,11 @@ decreasing, is 1."
(define (package-description-shtml package)
"Return a SXML representation of PACKAGE description field with HTML
vocabulary."
- (and=> (package-description package)
- (compose stexi->shtml texi-fragment->stexi)))
+ ;; 'texi-fragment->stexi' uses 'call-with-input-string', so make sure
+ ;; those string ports are Unicode-capable.
+ (with-fluids ((%default-port-encoding "UTF-8"))
+ (and=> (package-description package)
+ (compose stexi->shtml texi-fragment->stexi))))
(define (package-logo name)
(and=> (lookup-gnu-package name)