This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-20
Channels
- # aleph (2)
- # boot (18)
- # cider (3)
- # cljs-dev (14)
- # cljsrn (28)
- # clojure (428)
- # clojure-austin (3)
- # clojure-hk (1)
- # clojure-ireland (5)
- # clojure-mexico (1)
- # clojure-quebec (2)
- # clojure-russia (49)
- # clojure-spec (138)
- # clojure-uk (45)
- # clojurescript (70)
- # core-async (1)
- # cursive (8)
- # datomic (13)
- # defnpodcast (3)
- # devops (1)
- # editors (4)
- # events (1)
- # funcool (14)
- # hoplon (17)
- # jobs-rus (1)
- # luminus (5)
- # mount (51)
- # off-topic (21)
- # om (9)
- # om-next (8)
- # onyx (43)
- # planck (6)
- # re-frame (13)
- # reagent (18)
- # ring-swagger (1)
- # spacemacs (17)
- # untangled (18)
- # vim (13)
- # yada (21)
I'm dealing with a bug report of UTF-8 characters not showing correctly. Has anybody seen any issues with utf-8 in untangled? Starting to look like it might be because the transit middleware in untangled isn't assigning a default charset of utf-8?
(The £ symbol is fine when pushed over our websocket subscription, but when I refresh the page and it's pulled via /api, suddenly it renders incorrectly)
@therabidbanana: The transit encoding is definitely different if you are using untangled-websockets. But at the end of the day, websockets uses a lot of the same code. The transit encoding happens in untangled.server.impl.middleware
We're using our own websocket implementation
But I think I've figured out how to reproduce - JVM on our production servers must have locale settings that make it think ASCII is the default if one is not provided.
If we boot the jvm with -Dfile.encoding=utf-8, it works as expected, so probably not a bug, but maybe a potentially dangerous undefined default somewhere in transit encoder setup?
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.
It might be worth testing that with checkouts in your environment and seeing it it resolves something
Do we think it's something untangled should enforce? Happy to submit a patch for it if that's the way we wanted to go, but wasn't sure if we want to make that assumption for everyone
@therabidbanana: It should definitely be configurable, but in the end, fall back to utf-8
@jasonjckn: on your diff patch. how well tested is that from a cljs perspective? Have you written and run tests in the spec?