Re: [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: Alan M. G. <alm...@gm...> - 2014-11-08 23:54:18
|
Ugh. Non-ASCII is hard to type on a majority of keyboards unless you add special stuff. I don't think that'll increase acceptance. On Thu, Oct 30, 2014 at 12:58 AM, David A. Wheeler <dwh...@dw...> wrote: > 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 > > ------------------------------------------------------------------------------ > _______________________________________________ > Readable-discuss mailing list > Rea...@li... > https://lists.sourceforge.net/lists/listinfo/readable-discuss |