summaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/skribilo/engine/lout.scm81
1 files changed, 49 insertions, 32 deletions
diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm
index 42fe065..bfc60dc 100644
--- a/src/guile/skribilo/engine/lout.scm
+++ b/src/guile/skribilo/engine/lout.scm
@@ -1,8 +1,8 @@
;;; lout.scm -- A Lout engine.
-;;; -*- coding: iso-8859-1 -*-
+;;; -*- coding: utf-8 -*-
;;;
;;; Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-;;; 2012, 2015, 2018, 2020 Ludovic Courts <ludo@gnu.org>
+;;; 2012, 2015, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;;
;;; This file is part of Skribilo.
@@ -85,36 +85,53 @@
;* lout-encoding ... */
;*---------------------------------------------------------------------*/
(define lout-encoding
- `(,@lout-verbatim-encoding
- (#\ "{ @Char ccedilla }")
- (#\ "{ @Char Ccdeilla }")
- (#\ "{ @Char acircumflex }")
- (#\ "{ @Char Acircumflex }")
- (#\ "{ @Char agrave }")
- (#\ "{ @Char Agrave }")
- (#\ "{ @Char eacute }")
- (#\ "{ @Char Eacute }")
- (#\ "{ @Char egrave }")
- (#\ "{ @Char Egrave }")
- (#\ "{ @Char ecircumflex }")
- (#\ "{ @Char Ecircumflex }")
- (#\ "{ @Char ugrave }")
- (#\ "{ @Char Ugrave }")
- (#\ "{ @Char ucircumflex }")
- (#\ "{ @Char Ucircumflex }")
- (#\ "{ @Char oslash }")
- (#\ "{ @Char ocircumflex }")
- (#\ "{ @Char Ocircumflex }")
- (#\ "{ @Char odieresis }")
- (#\ "{ @Char Odieresis }")
- (#\ "{ @Char icircumflex }")
- (#\ "{ @Char Icircumflex }")
- (#\ "{ @Char idieresis }")
- (#\ "{ @Char Idieresis }")
- (#\] "\"]\"")
- (#\[ "\"[\"")
- (#\ "{ @Char guillemotright }")
- (#\ "{ @Char guillemotleft }")))
+ ;; XXX: As of Guile-Reader 0.6.3, characters like #\ç are not properly
+ ;; read. Use strings to work around it.
+ (let-syntax ((chr (lambda (s)
+ (syntax-case s ()
+ ((_ str replacement)
+ #`(list #,(string-ref (syntax->datum #'str) 0)
+ replacement))))))
+ `(,@lout-verbatim-encoding
+ ,@(list (chr "ç" "{ @Char ccedilla }")
+ (chr "Ç" "{ @Char Ccdeilla }")
+ (chr "â" "{ @Char acircumflex }")
+ (chr "Â" "{ @Char Acircumflex }")
+ (chr "à" "{ @Char agrave }")
+ (chr "À" "{ @Char Agrave }")
+ (chr "é" "{ @Char eacute }")
+ (chr "É" "{ @Char Eacute }")
+ (chr "è" "{ @Char egrave }")
+ (chr "È" "{ @Char Egrave }")
+ (chr "ê" "{ @Char ecircumflex }")
+ (chr "Ê" "{ @Char Ecircumflex }")
+ (chr "ù" "{ @Char ugrave }")
+ (chr "Ù" "{ @Char Ugrave }")
+ (chr "û" "{ @Char ucircumflex }")
+ (chr "Û" "{ @Char Ucircumflex }")
+ (chr "ø" "{ @Char oslash }")
+ (chr "ô" "{ @Char ocircumflex }")
+ (chr "Ô" "{ @Char Ocircumflex }")
+ (chr "ö" "{ @Char odieresis }")
+ (chr "Ö" "{ @Char Odieresis }")
+ (chr "î" "{ @Char icircumflex }")
+ (chr "Î" "{ @Char Icircumflex }")
+ (chr "ï" "{ @Char idieresis }")
+ (chr "Ï" "{ @Char Idieresis }")
+ (chr "ă" "{ { { Times Base } @Font @Char \"breve\" } |0.5ro a }")
+ (chr "ș" "{ { @Char \"cedilla\" } |0.5ro s }")
+ (chr "]" "\"]\"")
+ (chr "[" "\"[\"")
+ (chr "»" "{ @Char guillemotright }")
+ (chr "«" "{ @Char guillemotleft }")
+ (chr " " "~") ;no-break space
+ (chr "—" "---")
+ (chr "–" "--")
+ (chr "“" "``")
+ (chr "”" "''")
+ (chr "‘" "`")
+ (chr "’" "'")
+ (chr "…" "...")))))
;; XXX: This is just here for experimental purposes.