1

Here's my code:

private JTextPane htmlTextPane = new JTextPane();
htmlTextPane.setContentType("text/html;Charset=CP1251");

When I try to get out text from JTextPane to console like this:

System.out.println(htmlTextPane.getText());

some symbols, for example &, look in console like &amp

What do I need to do to get symbols not like HTML code?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
evg
  • 29
  • 7
  • 2
    Depends on the console you are using. Java does not dictate to the console what characters it should be able to print – Chris Jul 20 '17 at 13:19

0 Answers0