title: Scanner not scanning UTF-8 characters correctly (java)
body: <p>I am making a console program that scans names which often include Czech characters like ěščřžáíé. In eclipse, it worked flawlessly but when I exported it into a jar file and ran it in cmd the scanner replaced the Czech characters with characters like &quot;ˇçź&quot;. When I print the characters with <code>System.out.print(&quot;ěščřžýá&quot;);</code> They show correctly.  I tried using <code>chcp</code> 65001 in the cmd to change the encoding to UTF-8 but that completely removed the Czech letters everywhere in the program. I also tried using <code>new Scanner(System.in, &quot;UTF-8&quot;)</code> but that just replaced the letters with question marks. How can I fix this? Thanks in advance</p>