1

Is there a way to setup the racket terminal so that it can display unicode characters? It would be helpful, since Dr. Racket itself supports unicode file formats.

Ð..
  • 298
  • 5
  • 18
  • Which terminal are you starting racket in? – soegaard Jul 09 '17 at 19:45
  • I am not sure what you want but when I type `> (display "क")` in my DrRacket 6.3 (in Ubuntu) I get `क`. More on Racket [documentation](https://docs.racket-lang.org/guide/strings.html) Is this what you want?. – arif Jul 09 '17 at 19:50
  • Sorry, I meant the Racket terminal itself i.e. when you run racket.exe a terminal pops up. – Ð.. Jul 09 '17 at 20:01
  • I'm not in DrRacket itself, just racket. When I type (display "λ") I get "?" back. – Ð.. Jul 09 '17 at 20:03

1 Answers1

1

Try

chcp 65001

before starting Racket. That should change the code page to UTF-8.

soegaard
  • 30,661
  • 4
  • 57
  • 106
  • Do you know what the code-page is for "∀" "∃" and "λ"? – Ð.. Jul 09 '17 at 20:19
  • They ought to be displayed correctly on a utf-8 terminal? – soegaard Jul 09 '17 at 20:20
  • Weird... I get a question mark in a box for these characters. I am running a Racket program in the terminal whose file encoding is saved as UTF-8. – Ð.. Jul 09 '17 at 20:26
  • It is able to echo lambda but not ∀. When I copy and paste it into the command line it turns into a question mark in a box. – Ð.. Jul 09 '17 at 20:35
  • Do you have the Lucinda Console font? See https://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how/388500#388500 – soegaard Jul 09 '17 at 20:36
  • I switched to using Lucida Console font. Still isn't printing properly. – Ð.. Jul 15 '17 at 03:44
  • I get an empty square where the "for all"s should be. – Ð.. Jul 15 '17 at 03:45