0

So, I have basically been trying to use Spanish Characters in my program, but wherever I used them, Java would print out '?'.

I am using Slackware, and executing my code there.

I updated lang.sh, and added: export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 After this when I tried printing, it did not print the question marks, but other junk characters. I printed the default Charset on screen, and it has been successfully set, but it is not printing properly.

Help?

Thanks!

EDIT: I'm writing code in windows on NetBeans, and executing .class or .jar on slackware. Further, I cannot seem to execute locale command. I get error "bash: locale: command not found".

This is what confuses me: When I echo any special characters on Slackware console, they are displayed perfectly, but when I run a java program that simply prints it's command line arguments (and I enter the special characters as Command Line input), it outputs garbage.

1 Answers1

0

If you are using an ssh client such as PuTTY, check that it is using a UTF-8 charset as well.

SukkoPera
  • 621
  • 4
  • 8