From 37068cada1cc06b5442482d5a1c69e8791e134be Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Tue, 19 Mar 2024 16:05:37 +0100 Subject: convert.py, markdown: use UTF-8. Guile use ISO-8859-1 by default for ports. Since the markdown contain some UTF-8 characters, the resulting HTML ended up with unknown characters replaced by some '??'. Converting some dashes or quotes to ASCII equivalent was done in previous commits and was not a big issue, but some files also have characters with accents, so keeping most of the UTF-8 characters as-is and moving directly to UTF-8 is a better solution. Some characters still don't work, and end up in some haunt build errors (which is better than silent faillures like before). They all have valid equivalents so they were replaced by their equivalents. Signed-off-by: Denis 'GNUtoo' Carikli --- website/builders/replicant-blog.scm | 2 ++ website/readers/wordpress-markdown.scm | 2 ++ 2 files changed, 4 insertions(+) (limited to 'website') diff --git a/website/builders/replicant-blog.scm b/website/builders/replicant-blog.scm index c9cf639..92c2475 100644 --- a/website/builders/replicant-blog.scm +++ b/website/builders/replicant-blog.scm @@ -33,6 +33,8 @@ #:use-module (srfi srfi-19) #:export (replicant-blog-website)) +(fluid-set! %default-port-encoding "UTF-8") + (define-record-type (make-theme name layout post-template collection-template) theme? diff --git a/website/readers/wordpress-markdown.scm b/website/readers/wordpress-markdown.scm index 3c3f282..203b170 100644 --- a/website/readers/wordpress-markdown.scm +++ b/website/readers/wordpress-markdown.scm @@ -33,6 +33,8 @@ #:use-module (srfi srfi-19) #:export (wordpress-markdown-reader)) +(fluid-set! %default-port-encoding "UTF-8") + (define (string->custom-date* str) "Convert STR, a string in ISO 8601 format or the default format, into a SRFI-19 date object." -- cgit v1.2.3