Some strange character appears when a word document is opened in the viewer with the htmlOption=true. I tested with mvn spring-boot:run and Tomcat server and issue happened for both.
Git project: https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java.git
Git branch: master
Git revision: f75a0b7
SO: Windows 10
Java version: Redhat OpenJDK 11.0.10
Server: Tomcat 9.0.45
docx-gd21.docx (12.5 KB)
strange-symbol.png (28.4 KB)
We’re investigating this issue. It looks like these symbols are UTF-8 BOM. As soon as we have any update we’ll let you know.
I find where the error is.
I just had to add the encode as bellow:
return FileUtils.readFileToString(new File(htmlFilePath), StandardCharsets.UTF_8);
Thank you for sharing the fix. We’ll add this change into our code.