Skip to content

Commit

Permalink
8244324: RTFEditorKit does not display some of Japanese characters co…
Browse files Browse the repository at this point in the history
…rrectly

Reviewed-by: serb, psadhukhan
  • Loading branch information
vyommani authored and prsadhuk committed Jul 2, 2020
1 parent 911c553 commit 5fbac4a
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -133,6 +133,7 @@ class RTFReader extends RTFParser
static boolean useNeXTForAnsi = false;
static {
characterSets = new Hashtable<String, char[]>();
defineCharacterSet("ansicpg", latin1TranslationTable);
}

/* TODO: per-font font encodings ( \fcharset control word ) ? */
Expand Down Expand Up @@ -487,6 +488,11 @@ public boolean handleKeyword(String keyword, int parameter)
keyword.equals("private"))
ignoreGroupIfUnknownKeywordSave = true;

if (keyword.contains("ansicpg")) {
setCharacterSet("ansicpg");
return true;
}

if (rtfDestination != null) {
if(rtfDestination.handleKeyword(keyword, parameter))
return true;
Expand Down

0 comments on commit 5fbac4a

Please sign in to comment.