Free Support Forum - aspose.com

getInputEncoding() returns wrong value

Hello,
we are facing an issue on Aspose.Html library version 20.9.1. The getInputEncoding method in previous 18.6 version was returning the correct value, that on our testing document is UTF-16, while in the 20.9.1 version returns UTF-8.
The code we are using is the following:

com.aspose.html.HTMLDocument hd = new com.aspose.html.HTMLDocument(" HTML_UTF-16.html");
encInput = hd.getInputEncoding();

We have verified the input file with an hex editor, showing the UTF-16 BigEndian BOM marker on top:
image.png (12.3 KB)

Attached you can find the source html for testing.
Many thanks in advance.
Regards.

GianfrancoHTML_UTF-16.zip (833 Bytes)

@gianfranco.dancelli

We have logged an issue as HTMLJAVA-618 in our issue tracking system for the sake of further investigation. We will check the ticket in detail and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.