I have a problem with Scanner. In my program I ask user to enter path to file, and then read from it using DataInputStream. If user enter path with polish characters, Scanner can't read it properly, e.g : path = "C:żółw\plik" is interpreted as "C:��w\plik". There is also problem with space, path: "a b\plik" is interpreted as "b\plik". Is there any solution of this problem?
Asked
Active
Viewed 28 times
1 Answers
0
You should probably change the encoding of your IDE
On Windows the default encoding for Eclipse is Cp1252 for example.
UTF-8 should do it for polish.
If you use Eclipse then this might help you: Eclipse character encoding

Community
- 1
- 1

Tobias Mayr
- 196
- 4
- 16