I'll answer shortly since I can't comment
(I was in Windows 10)
I had similar problem - in Eclipse it showed "čšžđ" as output (Slavic Latin letters), but in console (Command Prompt) didn't, it was also showing "????" instead. I gave "chcp 852" and it showed correctly. List of these numbers can be found somewhere, like on Microsoft's "learn" website etc. I had "file.encoding" set previously on UTF-8 but ??? were showing