Strange character in the top left of viewer page for Word documents

Good afternoon,

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: GitHub - groupdocs-viewer/GroupDocs.Viewer-for-Java: GroupDocs.Viewer for Java examples, plugins and showcase
Git branch: master
Git revision: f75a0b7
SO: Windows 10
Java version: Redhat OpenJDK 11.0.10
Server: Tomcat 9.0.45
Files:

docx-gd21.docx (12.5 KB)
strange-symbol.png (28.4 KB)

@john.mcqueide

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);

@john.mcqueide

Thank you for sharing the fix. We’ll add this change into our code.

1 Like