We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose LoadOptions Wrong Encoding

Hi ! i wonder if there is a way to get out the encoding type when we dont feed the Document class with a LoadOptions.Encoding type.

If we dont specify the encoding Aspose has to guess wich encoding the file has, this has caused some problems. Therefor i need to get out somehow the encoding Aspose tries to apply so i can create an errorlog for historic data.

@henrikJohansen93 In case your documents are HTML documents, you can use FileFormatUtil to detect their encoding:

FileFormatInfo info = FileFormatUtil.DetectFileFormat(@"C:\Temp\in.html");

What types of documents do you have problem with? Could you please attach the problematic documents and let us know how to reproduce the problem? We will check the issue and provide you more information.

I am converting files of differnt types to PDF, and i need to test the encoding of the PDF’s(the output). I cant send over the files as they have some sensitive data attached, but i will try this out

@henrikJohansen93 If you see boxes instead of characters in the output PDF documents, most likely this is a problem with fonts, not with encoding.
It is safe to attach documents in the forum, only you and Aspose staff can access the attached documents.

They work when i force LoadFormat to use UTF-8, otherwise some of the characters like “+0” will be interpreted as south korean letters.

Not these records im afraid :confused:

@henrikJohansen93 If possible, could you please remove sensitive data from your documents and attach them here? This will allow us to better understand the problem and analyze it.