In order to see Unicode characters when running a Scala project using SBT inside a Windows console (
cmd) you have to perform the following steps:
regeditand navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ Console\TrueTypeFont. There should be an entry with key-value pair (“0″, “Lucida Console”). Add new pairs with a sequence of zeros as the key and a font as the value, e.g. (“00″, “DejaVu Sans”), (“000″, “Lucida Sans Typewriter”) etc.
Edit your SBT launcher-script – the one that runs SBT e.g. as
java %SBT_OPTS% -Xmx256M -jar "tools/sbt-launch-0.7.4.jar" %*and add the Java option
Open a Windows command box and run
chcp 65001to set the code page to UTF-8.
That’s it. You should now be able to see Unicode output of your Scala project when run from inside the SBT shell.
If you want to change the code page permanently, run
regedit, go to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage and change the “OEMCP” value to “65001″.