[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: website: packages: Correctly handle Unicode strings in descriptio
From: |
Ludovic Courtès |
Subject: |
01/01: website: packages: Correctly handle Unicode strings in descriptions. |
Date: |
Sat, 12 Sep 2015 12:06:44 +0000 |
civodul pushed a commit to branch master
in repository guix-artwork.
commit 2cad18a8891e741615d1d9260969fca4a73424d8
Author: Ludovic Courtès <address@hidden>
Date: Sat Sep 12 14:05:45 2015 +0200
website: packages: Correctly handle Unicode strings in descriptions.
* website/www/packages.scm (package->sxml)[package-description-shtml]:
Wrap in 'with-fluids'.
---
website/www/packages.scm | 7 +++++--
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)