Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-21908 Non-latin Chinese/Japanese characters are not supported in PDF file
  3. SAK-21921

In calendar tool, non-latin (Japanese/Chinese) characters are not supported while export site members in PDF file.




      To show the bug:
      1. Add a event to Calendar tool with a non-latin1(Chinese, in my case) title. You can just copy some Chinese characters from zh.wikipedia.org
      2. In the view of "Calendar by Week", "Calendar by Month" and "List of Events", there are three different type of PDF export. All of them cannot render Chinese characters correctly. Screen shots can be found in attachment.

      In folder calendar/calendar-impl/impl
      1. Modify sakai.properties
      Add an entry: fop.pdf.default.font=AR PL UMing CN
      "AR PL UMing CN" is a Chinese font. In Linux, it can be installed via "ttf-arphic-uming'
      Calendar originally upload "DejaVuSans" font, if admin wants to keep this setting, just set fop.pdf.default.font=DejaVuSans

      2. Modify pom.xml
      Update Apache FOP version from 0.20.5 to 1.0

      3. Modify src/config/schedule.xsl, src/config/schedulemm.xsl, srclist.xsl
      Set fo:root font to DEFAULT_FONT
      Adjust some code to meet the demand of FOP 1.0 which is more strict on XSL format.

      4. Add src/config/userconfig.xml
      Let FOP auto detect System fonts.

      5. Modify src/java/org/sakaiproject/calendar/impl/BaseCalendarService.java
      Update the FOP related code to couple with FOP 1.0.

      6. Delete folder src/config/fonts
      This folder used to contain the information of "Dejavu" font which is needed by previous version of FOP.
      Since the font can be auto detected in OS's font folder, It's no need anymore.

      I modify the code based on Sakai 2.8.1. The source and "diff" are in the attachment(without sakai.properties, and diff for deleted files are ommitted).
      Also, you can see the effect after fix the bug as attachment

        Gliffy Diagrams



            1. calendar_SAK-21921.patch.txt
              10 kB
              David Roldán Martínez
            2. calendar.diff
              11 kB
              Gao Jun
            3. Calendar-bug1.png
              50 kB
              Gao Jun
            4. Calendar-bug2.png
              44 kB
              Gao Jun
            5. Calendar-bug3.png
              49 kB
              Gao Jun
            6. Calendar-fix1.png
              55 kB
              Gao Jun
            7. Calendar-fix2.png
              58 kB
              Gao Jun
            8. Calendar-fix3.png
              108 kB
              Gao Jun
            9. sakai-calendar-impl.tar.gz
              50 kB
              Gao Jun



                Unassigned Unassigned
                gaojun Gao Jun
                0 Vote for this issue
                1 Start watching this issue



                    Git Integration