Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JTextPane displaying data using ISO-8859-1 instead UTF-8

807591May 19 2008 — edited May 19 2008
I a text string formatted in UTF-8, but when im trying to display the string in JTextPane it refuses to display it using utf-8 it seems like it is being displayed using ISO-8859-1. I have tried to cast the string to UTF-8 using String newString = new String(oldString.getBytes("UTF-8"), "UTF-8");

Also i have tried changing the content-type to "text/html; charset:utf-8" without any luck.

Anyone knows a clever way to force jtextpane to display its data using UTF-8?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 16 2008
Added on May 19 2008
6 comments
1,725 views