atronwestphal / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

Get content encoding charset for odt document #489

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hello,

Im trying to convert odt to html and this is the best library by far, so 
thankyou for your hard work. In doing the conversion Im trying to obtain the 
charset encoding of the odt document so that I can set the appropriate value on 
the html string. However I always get a 'null' value when trying to read the 
charset.

My code is :

        OdfTextDocument odfDoc = OdfTextDocument.loadDocument(is)
        System.out.println(odfDoc.getContentDom.getXmlEncoding)

which always returns 'null'

How do I get the encoding of an odt document please? Have attached my test 
document

What steps will reproduce the problem?
1. Attempt to get the xmlencoding of an odt document, you will get 'null'

What is the expected output? What do you see instead?
Expected: 'UTF-8', etc
Seeing: 'null'

What version of the product are you using? On what operating system?
1.0.5

Please provide any additional information below.

Original issue reported on code.google.com by joshua.f...@ephox.com on 28 Jul 2015 at 5:29

Attachments:

GoogleCodeExporter commented 8 years ago
Glad XDocReport can help you.

XDocReport uses OdfTextDocument, so please post your question to the ODFDOM 
forum.

Thanks

Regard's Angelo

Original comment by angelo.z...@gmail.com on 28 Jul 2015 at 7:56