diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-09-12 14:05:45 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-09-12 14:05:45 +0200 |
commit | 2cad18a8891e741615d1d9260969fca4a73424d8 (patch) | |
tree | 98e856c14d1cfecd9695793dc873a8abf838ae7a | |
parent | dd5c9902adaacc6240085149ed10b8af7f511f6b (diff) | |
download | guix-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.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) |