-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Traced back an encoding issue only happening in production in our Untangled app to a JVM configuration option - specifically, locally I was using equivalent of -Dfile.encoding=utf-8
JVM_OPTS flag (actually had an environment variable: export LC_ALL=en_US.utf8
, but Java uses that if file.encoding not set, apparently)
Seems like the transit encoder, since it is not told which encoding to use, just uses system default, which might change based on where an app is deployed - so probably not good to leave this behavior undefined.
Context from @mahinshaw on Slack:
This looks useful. We could change the writer to always write UTF-8. My guess i there is an environment issue with the ByteArrayOutputStream on your system. It could be configureable too.
https://github.com/untangled-web/untangled-server/blob/master/src/untangled/server/impl/middleware.clj#L7
Last link is the transit write
line 11 `ret (.toString baos)` => `ret (.toString baos "UTF-8")`
It might be worth testing that with checkouts in your environment and seeing it it resolves something
It should definitely be configurable, but in the end, fall back to utf-8
Metadata
Metadata
Assignees
Labels
No labels