Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-36557

Multibyte characters don't get rendered in Confluence 5.7 on Linux

    XMLWordPrintable

Details

    Description

      Multibyte characters ( like Japanese or Chinese ) does not get rendered in Confluence 5.7

      Steps to reproduce

      1. Upload Excel file which contains Japanese characters to a page in Confluence.
      2. Click on the spreadsheet

      Actual results

      Japanese characters are displayed as squares.

      Findings

      This issue does not happen when using Office Excel macro
      This issue does not happen on Word documents
      This issue does not happen when Confluence runs on Windows 7

      Solution

      This bug has been "fixed" in Confluence 5.8.8, but you still need a directory that contains the fonts used to create the document (please follow the Plugin Configuration section). There are no workarounds for this (except in some very specific cases see the "Optional configuration" section below), but to get the best rendering for all file types you will need the original fonts.

      Caveats:
      • If you're running 5.7 or 5.8 you can replace the existing plugin used to do the rendering with the fixed version. We can't provide support for this method, but it's being mentioned here to help those who can't upgrade their Confluence instance right away. We strongly recommend testing this on your staging instance before making any changes to your production environment.
      • Replacing the plugin can't be done using the "Manage Add-ons" administration screen due to the size of the plugin (it may work if your instance has enough heap allocated to Java, but your system will use more memory after installing it this way, so please don't do this and follow the provided instructions instead).
      Plugin installation

      To install the plugin on your system safely, do the following:

      1. Stop your Confluence instance.
        If you are running Confluence in a cluster, all nodes must be stopped, and the following steps repeated on each node (we are manually replacing a plugin, so if all the nodes are not stopped there's the chance that nodes may run with different versions of the library, which will cause all sort of problems)
      2. Go to your Confluence home directory, and go to the plugins-osgi-cache/transformed-plugins/ directory.
      3. Delete any document-conversion-library-1.X.XX_YYYYYY.jar files there, where X and Y are numbers (the numbers will be different, depending on your Confluence version). There can be more than one (depending on how many upgrades you've done to your instance). Please check the name of the file, there is a similar file called confluence-document-conversion-library... which should not be touched.
      4. In your Confluence installation directory, go to WEB-INF/atlassian-bundled-plugins and delete the file document-conversion-library-1.X.XX.jar. There should only be one this time.
      5. In the same directory, copy the new plugin jar document-conversion-library-1.2.12.jar, provided at the end of this description.
      Plugin configuration

      Now that we have the plugin installed, we need to specify a directory with all the fonts. This directory won't be recursively searched, so don't add any sub-directories as they won't be used.

      1. We need to specify the following parameter to Confluence as a JVM argument: confluence.document.conversion.fontpath. To do so, you can modify the setenv.sh (or setenv.bat if you're running Confluence under Windows Server) and add the following to CATALINA_OPTS: -Dconfluence.document.conversion.fontpath=/your/font/path. See https://confluence.atlassian.com/display/DOC/Configuring+System+Properties for more information on how to do this.
      2. If you want Confluence to re-render all existing thumbnails & PDFs, remove the files rendering cache from the Confluence shared home directory (if you're not on cluster, there should be a shared-home directory in the Confluence home directory). Remove dcl-document (containing the PDF previews) and dcl-thumbnail (containing the thumbnails). Be aware that this will trigger Confluence to re-render every document. It will do this as people visit pages containing files, not all at once.
      3. If you don't remove the files rendering cache, the new fonts will be visible the next time somebody uploads a new document, or uploads a new version of an existing file.
      4. Start Confluence.
      5. To confirm the change, go to the "Manage Add-ons" administration screen. Search for "Document Conversion Library" and check that you're running version 1.2.12.
      Optional configuration

      Other JVM flags that were added and might help with this issue:

      Flag Default value Description
      confluence.document.conversion.words.defaultfontname   The name (not the path) of the default font that will be used for Word rendering (.doc and .docx). A default font can be specified here that contains all the glyphs for your language(s)
      confluence.document.conversion.slides.defaultfontname.regular   The name (not the path) of the default font that will be used for Powerpoint rendering (.ppt and .pptx) for regular fonts
      confluence.document.conversion.slides.defaultfontname.asian TakaoPGothic The name (not the path) of the default font that will be used for Powerpoint rendering (.ppt and .pptx) for asian fonts
      confluence.document.conversion.slides.defaultfontname.symbol   The name (not the path) of the default font that will be used for Powerpoint symbols rendering (.ppt and .pptx). This is the font that will be used for bullets and other symbols when the font Symbol is not found

      The new plugin can be downloaded here: https://maven.atlassian.com/service/local/repositories/atlassian-public/content/com/atlassian/plugins/document-conversion-library/1.2.12/document-conversion-library-1.2.12.jar

      Attachments

        1. 2015-05-28-confluence-5.7-excel-preview-embedded.png
          2015-05-28-confluence-5.7-excel-preview-embedded.png
          77 kB
        2. 2015-05-28-confluence-5.7-excel-preview-expanded.png
          2015-05-28-confluence-5.7-excel-preview-expanded.png
          95 kB
        3. 2015-05-28-confluence-5.7-ppt-office-connector.png
          2015-05-28-confluence-5.7-ppt-office-connector.png
          110 kB
        4. 2015-05-28-confluence-5.7-ppt-preview-embedded.png
          2015-05-28-confluence-5.7-ppt-preview-embedded.png
          59 kB
        5. 2015-05-28-confluence-5.7-ppt-preview-expanded.png
          2015-05-28-confluence-5.7-ppt-preview-expanded.png
          61 kB
        6. 2015-05-28-confluence-5.7-word-office-connector.png
          2015-05-28-confluence-5.7-word-office-connector.png
          19 kB
        7. 2015-05-28-confluence-5.7-word-preview-embedded.png
          2015-05-28-confluence-5.7-word-preview-embedded.png
          15 kB
        8. 2015-05-28-confluence-5.7-word-preview-expanded.png
          2015-05-28-confluence-5.7-word-preview-expanded.png
          6 kB
        9. Confluence是一个专业的企业知识管理与协同软件.doc
          12 kB
        10. Confluence是一个专业的企业知识管理与协同软件.doc
          12 kB
        11. Emb_excel.png
          Emb_excel.png
          33 kB
        12. Emb_ppt.png
          Emb_ppt.png
          56 kB
        13. Emb_word.png
          Emb_word.png
          7 kB
        14. Excel file conversion test.xlsx
          28 kB
        15. Expand_excel.png
          Expand_excel.png
          74 kB
        16. Expand_ppt.png
          Expand_ppt.png
          55 kB
        17. Expand_word.png
          Expand_word.png
          18 kB
        18. powerpoint file conversion test.ppt
          258 kB
        19. pptx_1.png
          pptx_1.png
          40 kB
        20. pptx_2.png
          pptx_2.png
          28 kB
        21. pptx_3.png
          pptx_3.png
          39 kB
        22. pptx_test.pptx
          32 kB
        23. spreadsheet.jpg
          spreadsheet.jpg
          140 kB
        24. test1.xlsx
          10 kB
        25. View.png
          View.png
          98 kB
        26. Word file conversion test.docx
          12 kB
        27. 캡처.PNG
          캡처.PNG
          162 kB

        Issue Links

          Activity

            People

              egarcia Angel Eduardo Garcia Hernandez (Inactive)
              htoussi HosseinA
              Votes:
              18 Vote for this issue
              Watchers:
              38 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: