Commit 18f54bfd authored by Antoine Martin's avatar Antoine Martin
Browse files

Workaround for special encodings

parent 28d64c9c
......@@ -65,7 +65,13 @@
asd-file)))))
(defun file-to-string (pathname)
(with-open-file (file pathname)
(alexandria:read-file-into-string file)))
;; #### TODO: rather than replacing unsupported characters with a '?',
;; catch the error try again with :EXTERNAL-FORMAT :LATIN-1
;; (format of most of the offending READMEs)
;; If that fails too, then replace with '?' as a last resort move.
(alexandria:read-file-into-string
file
:external-format '(:utf-8 :replacement #\?))))
(defmacro read-write-file ((pathname content stream) &body body)
`(let ((,content (file-to-string ,pathname)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment