Clojure cannot print non-ASCII characters in OS X

I installed Clojure 1.2.0 using the Homebrew package management system on Mac OS X 10.6.4. Duration:

$ clj -e '(println " \n")'

in the terminal leads to:

??????? ????

While working in one terminal:

$ php -r 'echo " \n";'

displays cyrillic text correctly.

The same effect on startup $ clj <some .clj file in UTF-8 encoding>

Is this a known issue? Java Runtime-related? I thought that at this point the languages ​​would finally get Unicode.

+3
source share
2 answers

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

+8
source

Source: https://habr.com/ru/post/1765184/


All Articles