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

Multibyte characters don't get rendered when conversion sandbox enabled

    XMLWordPrintable

Details

    Description

      Issue Summary

      Multibyte characters don't get rendered when conversion sandbox enabled even when appropriate font is installed with the following steps.
      https://confluence.atlassian.com/confkb/non-ascii-characters-display-as-square-characters-in-confluence-317948797.html

      Environment

      • Confluence Data Center
      • document.conversion.sandbox.disable=false (same as default)
      • Multibyte font installed on the server
        • "4 fonts package" of Japanese IPA fonts (https://ipafont.ipa.go.jp/old/ipafont/download.html#en) installed in
          • /usr/share/fonts
          • /opt/atlassian/confluence/jre/lib/fonts/fallback
        • Following JVM argument is specified in setenv.sh
          CATALINA_OPTS="-Dconfluence.document.conversion.fontpath=/usr/share/fonts/ -Dconfluence.document.conversion.slides.defaultfontname.regular=IPAGothic -Dconfluence.document.conversion.slides.defaultfontname.asian=IPAGothic -Dconfluence.document.conversion.slides.defaultfontname.symbol=IPAGothic ${CATALINA_OPTS}"
          CATALINA_OPTS="-Dconfluence.document.conversion.words.defaultfontname=IPAGothic ${CATALINA_OPTS}"
          

      Steps to Reproduce

      1. Install Japanese fonts on the hosting server as described in above.
      2. Start a Confluence Data Center instance
      3. Attach テスト.pptx in an editor

      Expected Results

      "テストプレゼンテーション" is shown in thumbnail and preview.

      Actual Results

      Square characters are shown for thumbnail and preview.

      • Thumbnail
      • Preview

      Notes

      Characters are rendered correctly for some file type.
      As far as I confirmed in 6.12.2,

      file type thumbnail preview
      pptx
      docx
      xlsx
      txt

      Workaround

      Disable the conversion sandbox adding following option in setenv.sh. This is not recommended as it will affect the stability of the instance.

      CATALINA_OPTS="-Ddocument.conversion.sandbox.disable=true ${CATALINA_OPTS}"
      

      Solution

      Add the following to setenv.sh so that system settings are correctly propagated to the sandbox:

      CATALINA_OPTS="-Dconversion.sandbox.java.options=-Dconfluence.document.conversion.slides.defaultfontname.regular=IPAGothic,-Dconfluence.document.conversion.slides.defaultfontname.asian=IPAGothic,-Dconfluence.document.conversion.slides.defaultfontname.symbol=IPAGothic,-Dconfluence.document.conversion.words.defaultfontname=IPAGothic  ${CATALINA_OPTS}"
      

      Attachments

        Issue Links

          Activity

            People

              mbereznitsky Mark Bereznitsky
              nmukai Nobuyuki Mukai
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: