• Post Reply Bookmark Topic Watch Topic
  • New Topic

Encoding problen in RTFEditorKit  RSS feed

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 );

rtf.read(new BufferedReader(
new InputStreamReader(fi,"ISO-8859-9")),editor.getDocument(),0);
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!