Fork me on GitHub

encoding question: I've got some strings stored in datomic and I've got an api (yada) to fetch them. The string contains some accented characters. When I try locally, all seems to work fine. However, remote, it doesn't: 1. fetching the data via the api returns a string with a bunch of ? (where the accented characters should be), also if I curl them 'locally on the remote server'. 2. when I query the database from the repl (ssh to server, run emacs, cider connect), than I do see the accented characters as expected. Where exactly is it going wrong here?


updated locales on remote, seems to be ok now.


In your produces decls, always add charset.


:produces {:media-type "text/html" :charset "utf-8"}


Otherwise it's assumed to be any your jvm can produce


I really want to know why yada works locally in that case, it bit me too the other day!


I don't really know, but when I did set the locales of both systems the same, it magically worked 🙂. Local is en_GB.utf-8. Remote was C.UTF-8. It worked when I changed it to en_GB.utf-8 (or en_US.utf-8, or probably any other en_XX.utf-8 - I didn't try something like nl_XX.utf-8, though)


default JVM locale maybe ? all my vms have :jvm-opts ["-Dfile.encoding=UTF-8"] after having similar dev-machine / production-server problems in the past