diff options
| author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2024-03-19 16:05:37 +0100 |
|---|---|---|
| committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2025-06-15 01:30:26 +0200 |
| commit | 37068cada1cc06b5442482d5a1c69e8791e134be (patch) | |
| tree | cbf0c56facb86900a62fff39dda9b170db14ade0 /website | |
| parent | e254ef843ad19e72eff0327718b769f343835906 (diff) | |
| download | haunt-blog-37068cada1cc06b5442482d5a1c69e8791e134be.tar.gz haunt-blog-37068cada1cc06b5442482d5a1c69e8791e134be.tar.bz2 haunt-blog-37068cada1cc06b5442482d5a1c69e8791e134be.zip | |
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 <GNUtoo@cyberdimension.org>
Diffstat (limited to 'website')
| -rw-r--r-- | website/builders/replicant-blog.scm | 2 | ||||
| -rw-r--r-- | website/readers/wordpress-markdown.scm | 2 |
2 files changed, 4 insertions, 0 deletions
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 <theme> (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." |
