Windows a problem ?
Naaaa, impossible :)))

Luc P.

Sent from my iPhone

> On Jul 12, 2015, at 19:39, Sungjin Chun <chu...@gmail.com> wrote:
> 
> On Mac OS X (Yosemite) and Linux (Ubuntu), this code works well (I'm using 
> en_US.UTF-8 as 
> charset and encoding for my system).
> 
> I suspect that the OS (Windows) or its configuration is the source of the 
> problem.
> 
>> On Sunday, July 12, 2015 at 10:57:59 AM UTC+9, Denis Fuenzalida wrote:
>> I was able to reproduce an error involving Windows 7 and UTF-8 in a virtual 
>> machine with VirtualBox 4.3 (not sure if it is the issue that Alex 
>> experienced though):
>> 
>> * Installed Windows 7, then used Ninite.com to install Notepad++ (text 
>> editor), Oracle JDK 8 (1.8.0_45). Installed Leiningen 2.5.1 as .bat file 
>> from the website.
>> * Created a new leiningen project with "lein new app utf8test"
>> * Opened the file src/utf8test/core.clj in Notepad++ and replaced the 
>> contents of with the following:
>> 
>> (ns utf8test.core (:gen-class))
>> (defn saludo-año [año] (str "Saludos en el año " año))
>> (def saludo-japonés "どうもありがとう")
>> (defn -main [& args]
>>   (println (saludo-año 2015))
>>   (println saludo-japonés))
>> 
>> * On Notepad++ went to the Encoding menu and selected "Encoding in UTF-8 w/o 
>> BOM". Saved the file. When running "lein run" on the cmd.exe console it 
>> works but it outputs garbage instead of any non-ascii character (see 
>> http://i.imgur.com/H0rngyq.png)
>> 
>> * To trigger the compilation error, change the encoding of the file in 
>> Notepad++ to "Encoding in UTF-8". Save the file. When running "lein run" 
>> this time it will not compile and complains about being unable to resolve a 
>> symbol (see http://i.imgur.com/3SHegTH.png) ... however, if you type the 
>> contents of the file in the cmd.exe console (with "type 
>> src\utf8test\core.clj") you'll see there's some extra garbage chars before 
>> the namespace declaration.
>> 
>> My theory is that such garbage chars are the Byte Order Mark (BOM) Unicode 
>> character (https://en.wikipedia.org/wiki/Byte_order_mark) and they are not 
>> being correctly handled in Windows somewhere in the stack.
>> 
>> I don't use Windows regularly and I never had UTF-8 issues on Linux though.
>> 
>> --
>> 
>> Denis Fuenzalida
>> 
>> 
>> El jueves, 9 de julio de 2015, 12:33:46 (UTC-7), Daniel Compton escribió:
>>> 
>>> Hi Alex
>>> 
>>> You'll need to give us some more information about this to help us 
>>> troubleshoot what's going on. Can you share the file with us?
>>>> On Fri, 10 Jul 2015 at 3:59 AM Alex Woods <linp...@gmail.com> wrote:
>>>> clojure don't support .clj source code file by utf-8.
>>>> it's ok when the .clj source code files by  ascii 
>>>> 
>>>> env:
>>>> windows7,jdk1.8u45,lein2.5.0
>>>> 
>>>> -- 
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Clojure" group.
>>>> To post to this group, send email to clo...@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+u...@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/clojure?hl=en
>>>> --- 
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Clojure" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to clojure+u...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>> 
>>> -- 
>>> --
>>> Daniel
> 
> -- 
> 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
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to