Unable to render multibyte characters in document preview thumbnails after upgrading to Confluence Data Center 6.10.x and beyond
This Knowledge Base article was written specifically for Atlassian Data Center applications. The contents of this article do not apply to Server installations or the Atlassian Cloud platform.
Multibyte characters such as Japanese font installation does not render properly in document previews for Confluence Data Center starting from versions that include the Document Conversion Sandbox feature.
When rendering a thumbnail for an Office or PDF file that has multibyte characters installed (Japanese kanji, katanana, hiragana etc) you instead encounter a rendering issue where the text is replaced with Unicode escape characters or placeholder boxes.
- This was originally observed on Confluence Data Center 6.13.8 that was being upgraded from a 6.3.x.
- Using OpenJDK 1.8.0
- Amazon Linux 2 operating system (similar to RHEL 6)
Here's an example of expected behavior:
Actual behavior before solution path is applied from the same document
The issue stems from the fact that the system properties setting the default fonts for the Document Conversion service library, Aspose, do not get passed on to the sandbox process directly. Migrating to a version that has Document Conversion sandbox will thus cause thumbnail rendering to display the issues. It was originally discovered in testing for CONFSERVER-57588.
- Install the following font libraries using your package manager of choice. In the case of Amazon Linux 2, this would be
- Add the following JVM arguments in your
setenvfile as noted from CONFSERVER-57588. This will explicitly declare the font libraries to be passed to the Document Sandbox child process:
- Rebuild the Viewfiles macro cache in order to force document thumbnails to be regenerated: How to rebuild the viewfile cache from scratch
- Restart Confluence to apply changes.