开发者

Clojure failing to print non-ASCII chars on OS X

开发者 https://www.devze.com 2023-01-16 16:59 出处:网络
I\'ve installed Clojure 1.2.0 using Homebrew package management system on Mac OS X 10.6.4. Running: $ clj -e \'(println \"русский язык\\n\")\'

I've installed Clojure 1.2.0 using Homebrew package management system on Mac OS X 10.6.4. Running:

$ clj -e '(println "русский язык\n")'

in the Terminal results in:

??????? ????

While running in the same terminal:

$ php -r 'echo "русский язык\n";'

displays the Cyrillic text correctly.

The same effect when running $ clj <some .clj file in UTF-8 encoding>

Is that a known issue? Java Runtime-related? 开发者_StackOverflowI thought at this point languages finally get Unicode right.


the default java file.endcoding on osx is Mac Roman, you need to -D set it to utf8


Read http://groups.google.ru/group/clojure-russian/browse_thread/thread/56da274ad22a75df for clojure and russian language bugs and solutions.

0

精彩评论

暂无评论...
验证码 换一张
取 消