Przeglądaj źródła

Adding UTF-8 support.

Clement Gerouville 11 lat temu
rodzic
commit
0b645902a7
2 zmienionych plików z 3 dodań i 2 usunięć
  1. 2 1
      src/coleslaw.lisp
  2. 1 1
      src/content.lisp

+ 2 - 1
src/coleslaw.lisp

@@ -44,7 +44,8 @@ Additional args to render CONTENT can be passed via RENDER-ARGS."
44 44
   (with-open-file (out filepath
45 45
                    :direction :output
46 46
                    :if-exists :supersede
47
-                   :if-does-not-exist :create)
47
+                   :if-does-not-exist :create
48
+                   :external-format '(:utf-8))
48 49
     (write-line page out)))
49 50
 
50 51
 (defun compile-blog (staging)

+ 1 - 1
src/content.lisp

@@ -50,7 +50,7 @@
50 50
            (make-keyword (string-upcase (subseq line 0 (position #\: line)))))
51 51
          (read-tags (str)
52 52
            (mapcar #'make-tag (cl-ppcre:split "," str))))
53
-    (with-open-file (in file)
53
+    (with-open-file (in file :external-format '(:utf-8))
54 54
       (unless (string= (read-line in) (separator *config*))
55 55
         (error "The provided file lacks the expected header."))
56 56
       (let ((meta (loop for line = (read-line in nil)