Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6928542

Chinese characters in RTF are not decoded

XMLWordPrintable

    • b24
    • x86
    • windows_xp

        The keyword "fcharset" in RTF files are ignored. The result is that Chinese
        characters are garbage. The follow RTF document (also attached) should
        show 3 Chinese characters. All editors show it. But Java 5 and 6 shows
        garbage characters.

         
        {\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset136 Arial Unicode MS;}{\f1\fnil\fcharset0 MS Shell Dlg 2;}}

        {\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\f0\fs21\'e0\'f8\'b9\'ae\'e0\'f0\f1\fs17\par

        }

        RTF is important for Java because it is the default clipborad format under windows.
        test case has been added.

          1. sample-m-wordpad.jpg
            sample-m-wordpad.jpg
            60 kB
          2. sample-m-fixed.jpg
            sample-m-fixed.jpg
            42 kB
          3. sample-m.rtf
            2 kB
          4. RTFStylepad.jar
            148 kB
          5. chinese-wordpad.jpg
            chinese-wordpad.jpg
            37 kB
          6. chinese-withoutfix.jpg
            chinese-withoutfix.jpg
            24 kB
          7. chinese-fixed.jpg
            chinese-fixed.jpg
            24 kB
          8. chinese.rtf
            0.2 kB

              itakiguchi Ichiroh Takiguchi
              tyao Ting-Yun Ingrid Yao (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: