0

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.

meriken2ch
  • 409
  • 5
  • 15
  • 1
    Have you already tried specifying `-Dfile.encoding=UTF-8` on the command line when running the uberjar? Might work around the issue but I agree, your observed behaviour seems like a bug. – xsc Nov 02 '14 at 08:43
  • Thanks a lot for suggesting a possible workaround! I will try it as soon as I can. – meriken2ch Nov 02 '14 at 17:54

1 Answers1

1

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!

jcrossley3
  • 11,576
  • 4
  • 31
  • 32