On Oct 19, 2012, at 11:25 AM, David Nolen wrote:

> On Fri, Oct 19, 2012 at 4:52 AM, Henrik Mohr <[email protected]> wrote:
> Still I hope someone can answer the question on why ClojureScript behaves 
> differently from Clojure.
> 
> Output from Clojure:
> user=> (str "ø")
> "ø"
> 
> Output from ClojureScript:
>   #_=> (str "ø")
> "\xF8"
> 
> Output from node.js:
> > console.log ("ø");
> ø
> 
> Output from Chrome Console:
> console.log ("ø")
> ø
> 
> Anyone from Clojure Core that can comment on this?
> 
> Thanks in advance.
> 
> BRgds,
> Henrik
> 
> I believe this may be due to the logic in compiler.clj on lines 70-84. 
> Perhaps the condition on line 82 should be a bit broader, (< 31 cp 256) 
> instead of (< 31 cp 127) ?
> 
> I'm not sure ... if somebody else could chime in on that logic that would 
> help.

It's simpler than that; cljs is just using an inappropriate string quoting 
mechanism.

See http://groups.google.com/group/clojure-dev/msg/f679b8759b3fc54f and the 
linked issue and proposed patch.  (…which I've not filed with an issue yet 
because I think we should first come to some closure on whether it or the 
originally-proposed enhancement to JVM Clojure in CLJ-1025 is a better path.)

- Chas


-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to