0

I am trying to printsubscripts in java but whenever I type in the unicode value for said subscript and print it I get a "?" For example the code down below would print Na? instead of Naβ‚‚

System.out.println("Na\u2082");

Is there anything I can do to fix this. I've looked everywhere online and have absolutely no idea why this is happening. Any help would be greatly appreciated.

Spencer
  • 5
  • 5
  • [Works for me.](https://ideone.com/LC1AFZ) How are you testing? – shmosel Mar 23 '18 at 00:36
  • What you see on the console is irrelevant if it doesn't support UTF-8 characters. – Tim Biegeleisen Mar 23 '18 at 00:37
  • I am using jGrasp. Also I apologize about the previous title, I was changing something else I was going to submit before I found the answer and forgot to edit the title. – Spencer Mar 23 '18 at 00:49

0 Answers0