Multibyte characters ( like Japanese or Chinese ) does not get rendered in Confluence 5.7
- Upload Excel file which contains Japanese characters to a page in Confluence.
- Click on the spreadsheet
Japanese characters are displayed as squares.
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
This bug has been "fixed" in Confluence 5.8.8, but you need a directory that contains the fonts used to create the document (please follow the Plugin Configuration section). There are 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.
- 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 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 and follow the provided instructions instead).
To install the plugin on your system safely, do the following:
- 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)
- Go to your Confluence home directory, and go to the plugins-osgi-cache/transformed-plugins/ directory.
- 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 be touched.
- 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.
- In the same directory, copy the new plugin jar document-conversion-library-1.2.12.jar, provided at the end of this description.
Now that we have the plugin installed, we need to specify a directory with all the fonts. This directory be recursively searched, so don't add any sub-directories as they won't be used.
- 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.
- 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). that this will trigger Confluence to re-render every document. It will do this as people visit pages containing files, not all at once.
- 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.
- Start Confluence.
- 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.
Other JVM flags that were added and might help with this issue:
|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