Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Encoding problen in RTFEditorKit

Ahmet Aksoy
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code.
When I read an rtf file which was encoded with ISO-8859-9, I see that no encoding was taken into consideration. The special characters are not converted to the actual values.
What can I do?
Ahmet Aksoy
RTFEditorKit rtf = new RTFEditorKit();
JEditorPane editor = new JEditorPane();
editor.setEditorKit( rtf );

FileInputStream fi = new FileInputStream( filename ); BufferedReader(
new InputStreamReader(fi,"ISO-8859-9")),editor.getDocument(),0);
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic