[Readable-discuss] Clojure supports UTF-8 (thus, easy Unicode support)
Readable Lisp/S-expressions with infix, functions, and indentation
Brought to you by:
dwheeler
From: David A. W. <dwh...@dw...> - 2014-10-29 16:58:09
|
It appears that Clojure normally loads source files assuming they are UTF-8, which makes supporting Unicode much easier. This suggests that using a non-ASCII character might not be too hard for them to support. Source file src/jvm/clojure/lang/Compiler.java routine "loadFile" has this Java line, which I believe forces reading of source code as UTF-8: return load(new InputStreamReader(f, RT.UTF8), new File(file).getAbsolutePath(), (new File(file)).getName()); It's possible to do indirect loading where additional magic is necessary to force configuration of the encoding, as discussed here: https://stackoverflow.com/questions/1431008/enabling-utf-8-encoding-for-clojure-source-files --- David A. Wheeler |