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, B Smith-Mannschott <bsmith.o...@gmail.com> wrote:
> 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:
>
>   ; -*- coding: utf-8 -*-
>
> on the first or second line of the file.
>
> How about at the REPL?
>
> // Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to