Search code examples
utf-8clojureundertow

Is there a way to force a character encoding on Immutant 2/Undertow in Clojure?


Is there any way to force a character encoding on Immutant 2/Undertow in Clojure? I am using Immutant 2 (2.0.0-alpha2) for my web application that serves web pages in Japanese in UTF-8, and, although the application runs perfectly fine in REPL on Eclipse, Immutant 2 converts HTTP response bodies into Shift_JIS, the default character encoding for non-Unicode applications in my Windows setup, once I convert the app into an uberjar.

I strongly suspect that this is a bug in Immutant 2/Undertow as UTF-8 is specified in the response header and this problem never occurred with Jetty and HTTP Kit. I would appreciate any pointers at this point as I spent the whole day today on this issue and I am almost ready to give up on Immutant 2 and go back to HTTP Kit.


Solution

  • It is most definitely a bug. I just pushed a fix that you can confirm using the latest incremental.

    Sorry for the trouble, and thanks for the report!