-
Bug
-
Resolution: Won't Fix
-
P4
-
None
-
7u51
-
x86
-
windows_7
FULL PRODUCT VERSION :
java version "1.6.0_41"
Java(TM) SE Runtime Environment (build 1.6.0_41-b02)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
The user is using RTFeditorkit API to read chinese RTF characters but the output is garbage character. For duplicating the issue i used 电买开东车红马� 鸟热时语假罐佛 chinese text and then i used RTFEditorKit.read(). But i was getting output as garbage.
ADDITIONAL REGRESSION INFORMATION:
java version "1.6.0_41"
Java(TM) SE Runtime Environment (build 1.6.0_41-b02)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use any RTF editor for duplicating the issue.
1. Enter chinese character in the editor.
2. Now pass this chinese characters to any method and use rtfEditorKit.read() to read this chinese characters.
3.The output for this is garbage.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should return the correct text.
ACTUAL -
i am getting µçÂò¿ª¶«³µºìÂíÎÞÄñÈÈʱÓï¼Ù¹Þ for chinese characters 电买开东车红马� 鸟热时语假罐佛.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static String convertRTF(String rtfText) {
StringWriter writer = new StringWriter();
try {
ByteArrayInputStream input = new ByteArrayInputStream(rtfText.getBytes());;
RTFEditorKit rtfEditorKit = new RTFEditorKit();
Document doc = rtfEditorKit.createDefaultDocument();;
rtfEditorKit.read(input, doc, 0);
} catch (Exception ex) {
}
return doc;
}
---------- END SOURCE ----------
java version "1.6.0_41"
Java(TM) SE Runtime Environment (build 1.6.0_41-b02)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
A DESCRIPTION OF THE PROBLEM :
The user is using RTFeditorkit API to read chinese RTF characters but the output is garbage character. For duplicating the issue i used 电买开东车红马� 鸟热时语假罐佛 chinese text and then i used RTFEditorKit.read(). But i was getting output as garbage.
ADDITIONAL REGRESSION INFORMATION:
java version "1.6.0_41"
Java(TM) SE Runtime Environment (build 1.6.0_41-b02)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Use any RTF editor for duplicating the issue.
1. Enter chinese character in the editor.
2. Now pass this chinese characters to any method and use rtfEditorKit.read() to read this chinese characters.
3.The output for this is garbage.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should return the correct text.
ACTUAL -
i am getting µçÂò¿ª¶«³µºìÂíÎÞÄñÈÈʱÓï¼Ù¹Þ for chinese characters 电买开东车红马� 鸟热时语假罐佛.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public static String convertRTF(String rtfText) {
StringWriter writer = new StringWriter();
try {
ByteArrayInputStream input = new ByteArrayInputStream(rtfText.getBytes());;
RTFEditorKit rtfEditorKit = new RTFEditorKit();
Document doc = rtfEditorKit.createDefaultDocument();;
rtfEditorKit.read(input, doc, 0);
} catch (Exception ex) {
}
return doc;
}
---------- END SOURCE ----------