Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-400

Unable to obtain the charset encoding of an odt document

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • odfdom
    • None
    • linux - ubuntu 14.04

    Description

      Im trying to convert odt to html. 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 end. However I always get a 'null' value when trying to read the charset.

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

      For the test document attached I am expecting to get UTF-8 but always see 'null'. Happens on other docs as well,

      Is there a better way to obtain the charset encoding of an odt document?

      Attachments

        1. testOdt.odt
          53 kB
          Joshua
        2. 400-part3-main-OdfFileDom_initXmlDecl.patch
          4 kB
          Nimarukan
        3. 400-part2-test-OdfFileDom_xmlDeclTest.patch
          6 kB
          Nimarukan
        4. 400-part1-pom_xml-FromJava1_5To1_6ForStAX.patch
          0.5 kB
          Nimarukan

        Activity

          People

            Unassigned Unassigned
            joshua.fernandes Joshua
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: