diff options
| author | Peter Bex <peter@more-magic.net> | 2026-10-05 13:15:24 +0200 |
|---|---|---|
| committer | Peter Bex <peter@more-magic.net> | 2026-10-05 13:15:24 +0200 |
| commit | cae6997dbcf9c71814873fd5884bd1cc47ded304 (patch) | |
| tree | fdce0b782877a07fe7c7202b38f7fc7a17ae0cac | |
| parent | 5b5bff7d71bb72bd18cddf0955d835b0d98dbfc7 (diff) | |
| download | spiffy-cae6997dbcf9c71814873fd5884bd1cc47ded304.tar.gz | |
Use utf-8 charset comprehensively for text(ish) types6.5.1
| -rw-r--r-- | spiffy.scm | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -94,21 +94,18 @@ (define mime-type-map (make-parameter '(("html" . #(text/html ((charset . utf-8)))) - ("xhtml" . application/xhtml+xml) - ("js" . application/javascript) + ("xhtml" . #(application/xhtml+xml ((charset . utf-8)))) + ("js" . #(application/javascript ((charset . utf-8)))) ("css" . #(text/css ((charset . utf-8)))) ("png" . image/png) - ;; A charset parameter is STRONGLY RECOMMENDED by RFC 3023 but it overrides - ;; document declarations, so don't supply it (assume nothing about files) - ("xml" . application/xml) - ;; Use text/xml only if it is *truly* human-readable (eg docbook, recipe...) - #;("xml" . text/xml) + ;; NOTE: We now pass in charset, which can be overridden if the user wants + ("xml" . #(application/xml ((charset . utf-8)))) ("pdf" . application/pdf) ("jpeg" . image/jpeg) ("jpg" . image/jpeg) ("gif" . image/gif) ("ico" . image/vnd.microsoft.icon) - ("svg" . image/svg+xml) + ("svg" . #(image/svg+xml ((charset . utf-8)))) ("txt" . #(text/plain ((charset . utf-8))))))) (define default-mime-type (make-parameter 'application/octet-stream)) (define file-extension-handlers (make-parameter '())) |
