Re: how does clojure's reader determine encoding when reading source from file?

2009-07-02 Thread B Smith-Mannschott
On Thu, Jul 2, 2009 at 21:11, Daniel Lyons wrote: > On Jul 2, 2009, at 1:00 PM, B Smith-Mannschott wrote: >> What was confusing me is that slime/swank seem to be using >> iso-latin-1-unix and so trip over greek letters. I've not yet found >> the knobs to twiddle in emacs to get it to use UTF-8 her

Re: how does clojure's reader determine encoding when reading source from file?

2009-07-02 Thread Tayssir John Gabbour
Hi Ben, This is sitting in my .emacs file: (set-language-environment "UTF-8") (setq slime-net-coding-system 'utf-8-unix) (I don't know whether it'll work for you, just as I don't know whether all the things sitting in my fridge are edible... Good luck. ;) Tayssir On Jul 2, 9:00 pm, B Sm

Re: how does clojure's reader determine encoding when reading source from file?

2009-07-02 Thread Daniel Lyons
On Jul 2, 2009, at 1:00 PM, B Smith-Mannschott wrote: > > On Thu, Jul 2, 2009 at 18:39, Stuart Sierra > wrote: >> >> Hi Ben, >> Clojure assumes UTF-8 when loading code. If you want to load source >> code in a different encoding, you can open a java.io.Reader with the >> appropriate encoding; th

Re: how does clojure's reader determine encoding when reading source from file?

2009-07-02 Thread B Smith-Mannschott
On Thu, Jul 2, 2009 at 18:39, Stuart Sierra wrote: > > Hi Ben, > Clojure assumes UTF-8 when loading code.  If you want to load source > code in a different encoding, you can open a java.io.Reader with the > appropriate encoding; the easiest way to do that is probably to use > clojure.contrib.duck-

Re: how does clojure's reader determine encoding when reading source from file?

2009-07-02 Thread Stuart Sierra
Hi Ben, Clojure assumes UTF-8 when loading code. If you want to load source code in a different encoding, you can open a java.io.Reader with the appropriate encoding; the easiest way to do that is probably to use clojure.contrib.duck-streams and bind *default-encoding*. -SS On Jul 2, 2:20 am,

how does clojure's reader determine encoding when reading source from file?

2009-07-01 Thread B Smith-Mannschott
When clojure loads a source file, how does it know what encoding to use? Does it just assume Latin-1? Does it just use platform encoding (not the same on all platforms!)? Is there a way to tell it the source is UTF-8 encoded? If not, perhaps following the Python/Emacs convention might be sensible: