uniencode and xml

Discussion about LiveCode Global Jam events and activities

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Locked
jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

uniencode and xml

Post by jameshale » 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...

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]
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?

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: uniencode and xml

Post by jameshale » Sat May 24, 2014 6:33 am

Actually is the xml library working?

I am tracing my errors back to a call to "revCreateXMLtree"

trying to debug this as I trace (either into or over) I get ejected from the handler, the script and back into the calling script which promptly errors out as the script with the xml code has not completed.

tried wrapping it in a try/end try but it still jumps out.

testing LC7DP5 on the epub opener stack I submitted to LiveCodeShare a while ago.

not a happy stacky.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9802
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: uniencode and xml

Post by FourthWorld » Sat May 24, 2014 10:22 pm

The Release Notes for v7 list uniEncode and uniDecode as deprecated (with notes, on p14).

As for the XML part, if the problem is reproducible it may be good to submit the recipe in a bug report:
http://quality.runrev.com/
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: uniencode and xml

Post by jameshale » Sun May 25, 2014 6:38 am

man I hate being called away while posting a reply.
nice long body of text just gone as my credentials seemed to expire.
Oh well.

I have done more work and can report there is definitely something weird with the script debugger.
Have no idea how to make it replicable without submitting my project (at least for now.)
Have also discovered anomalies in the revZIP library, or to be more correct, how LC7 is acting on the revZIP functions.
Will try to uncover more, resolve or post a test stack.

Locked

Return to “LiveCode Global Jam”