On Jul 2, 2009, at 1:00 PM, B Smith-Mannschott wrote:

>
> On Thu, Jul 2, 2009 at 18:39, Stuart Sierra<the.stuart.sie...@gmail.com 
> > 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-streams and bind *default-encoding*.
>>
>
> Thanks, that's great. Defaulting to UTF-8 is the Right Thing to do,
> IMHO. I tried it out and found that I can, for example, name variables
> with greek letters. Neat.
>
> 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 here, but at
> least the problem is not Clojure.


(setq slime-net-coding-system 'utf-8-unix)

:)

user> (def שלם 'peace)
#'user/שלם
user> שלם
peace

Interestingly, Emacs doesn't seem to change the writing direction, but  
when I pasted it into my mail client it did the right (-to-left)  
thing. This stuff is tricky.

—
Daniel Lyons


--~--~---------~--~----~------------~-------~--~----~
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