I want to keep a constant around to represent the UTF-8 Charset.
(java.nio.charset.Charset/forName "UTF-8")
; #<UTF_8 UTF-8>
(def ^:const utf-8 (java.nio.charset.Charset/forName "UTF-8"))
; #'user/utf-8
utf-8
; #<UTF_8 UTF-8>
But when I use it, I get an error:
(type utf-8)
; CompilerException java.lang.RuntimeException: Can't embed object in code, maybe print-dup not defined: UTF-8, compiling:(NO_SOURCE_PATH:1:1)
How can I fix this?