1

When I attempt to run my program in my command prompt (Windows 7), some of the text that is returned is turned into question marks. I thought I had solved the issue by adding "UTF-8" to my BufferedReader:

BufferedReader br = new BufferedReader(new InputStreamReader(
            new FileInputStream(file), "UTF-8"));

Which seems to work in Eclipse, but not in cmd.exe. Thoughts?

Dumpcats
  • 453
  • 5
  • 21
  • 2
    Do you know what format cmd.exe use in default? This is some information about change default code page of Windows console to UTF-8: http://superuser.com/questions/269818/change-default-code-page-of-windows-console-to-utf-8 – Shondeslitch May 03 '15 at 01:18
  • 1
    Does the font used in your Command Prompt window support the characters you're returning? – nitind May 03 '15 at 05:47
  • The code change you made, meant that the file was properly decoded but the problem is that cmd.exe uses 8bit code pages by default. See: http://stackoverflow.com/questions/388490/unicode-characters-in-windows-command-line-how/388500#388500 – Alastair McCormack May 04 '15 at 17:00

0 Answers0