I'm running Jetty on OSX on my dev environment. Currently character encoding seems to be faulti (probably mac-roman), overriding Jetty default. How can I force the encoding to be UTF-8? This problem seems to appear only on OSX, linux/windows works fine.
I'm running Jetty from terminal so eclipse-specific solutions aren't of help.
Apparently I was wrong in blaming Jetty for this problem. The reason was maven and how maven brings in the default encoding java-settings.
Setting this env-variable seemed to solve the problem:
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8
Answer found from here.
No problem here however we start Jetty from the javaWrapper (and which should not make a difference).
The only parameter I can see making an impact is setting the file.encoding System Property e.g. -Dfile.encoding=UTF-8
EDIT ( our macs locale are set to utf-8 )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With