Sono stato sorpreso di scoprire che la mia app ring non stava servendo correttamente utf-8. Ho ridotto questo a un semplice caso di test, qualcuno sa come garantire che questo restituirà sempre utf-8 al browser?clojure e anello: utf-8 nelle risposte viene come '?'
(ns utf8test.core)
(defn app
[request]
{:status 200 :body "ɮѪϴ"})
In project.clj (usando il plugin Lein-ring):
:ring {:handler utf8test.core/app}
nel terminale:
> lein ring server
---> ɮѪÏ' (questo è sbagliato, dovrebbe essere ɮѪΘ)
Preferibilmente un metodo che funziona anche per tomcat, poiché è qui che viene distribuita l'app.
Grazie!
Questo ha funzionato, grazie! – prismofeverything