I have problems with some of the utf-8 characters in sbcl 1.0.18 and hunchentoot-0.15.7 (Ubuntu)
When I create a handler like this:
(defun test-handler ()
(no-cache)
(recompute-request-parameters :external-format (flex:make-external-format :utf-8 :eol-style :lf))
(setf (hunchentoot:content-type) "text/html; charset=utf-8")
(with-html-output-to-string (*standard-output* nil :prologue nil :indent nil)
(:html
(:head
(:title "Test page"))
(:body
(:p
""quotation"")))))
Where I have those "right and left quotation marks" I get an error:
#\LEFT_DOUBLE_QUOTATION_MARK (code 8220) is not a LATIN-1 character.
[Condition of type FLEXI-STREAMS:EXTERNAL-FORMAT-ENCODING-ERROR]
If, on the other hand, I set global variable *hunchentoot-default-external-format* to utf-8
(setf *hunchentoot-default-external-format* (flex:make-external-format :utf-8 :eol-style :lf))
then everything works.
I just want one handler to handle the uft-8 encoding, how can I fix it?
Thank you,
Andrew