uniencode and xml
Posted: Sat May 24, 2014 4:36 am
my app uses the xml and zip libraries to unpack and read epubs.
In order to actually read the text correctly I have, at the suggestion of somewhere in the list) used the uniencode/decode construction as in...
Now I have not been able to test this properly under LC7 partly due to the funny error messages pointing who knows where but also because not all the epubs I can open under LC6.7 or less perform consistently under LC7.
I tried removing the "unidecode(uniencode(temp, "UTF8"))" line but that didn't work giving me errors in the XML.
So I don't know if this construction is now wrong, or the zip or XML libraries have changed.
First things first. Is "unidecode(uniencode(temp, "UTF8"))" still the right way to go or should I be doing something else?
In order to actually read the text correctly I have, at the suggestion of somewhere in the list) used the uniencode/decode construction as in...
Code: Select all
--a text file so get its contents
revZipExtractItemToVariable pArchive, sOPS & aMan[sNItemRef][href] , "temp"
--process html
put unidecode(uniencode(temp, "UTF8")) into temp
put temp into aMan[sNItemRef][content_html]
I tried removing the "unidecode(uniencode(temp, "UTF8"))" line but that didn't work giving me errors in the XML.
So I don't know if this construction is now wrong, or the zip or XML libraries have changed.
First things first. Is "unidecode(uniencode(temp, "UTF8"))" still the right way to go or should I be doing something else?