Reputation: 359
EDITED
hey guys.
My code is using pircBot to send IRC messages to twitch.tv.
The messages include characters such as '█▓▒ CRIT! ░░╚╡▌▌╞╗░░'
Example output code: sendMessage("#twitchraidstwitch", "/me █▓▒ CRIT! ░░╚╡▌▌╞╗░░");
So These characters originally all displayed as '?' in Eclipse. They didn't work properly until I changed my window -> preferences -> text file encoding to US-ASCII. (Though I've just learned these characters aren't even ASCII.)
When I export my project to a jar and try to run in CMD, the characters are back to '?'.
How do I got about getting this to work in cmd?
Thanks!
Upvotes: 2
Views: 5643
Reputation: 359
Ok I got it to work.
I used setEncoding("UTF-8"); as Score_Under suggested. It didn't change anything but it didn't hurt either.
I then launched with java -Dfile.encoding="UTF-8" -jar JarFile.jar and that did the trick.
I figured it out from UTF-8 works on Eclipse but fails to work with an exported jar
Upvotes: 9