Importing HTML UniCode text into LiveCode

Richmond Mathewson richmondmathewson at gmail.com
Sun May 28 04:05:15 EDT 2017


So: Having exported Unicode text from my Devawriter Pro to HTML (which 
shows up in a Web Browser alright *IFF* the text encoding
is set to 'Unicode'), on REIMPORTING that HTML file I get something that 
does NOT look the same at all.

My script WAS set to this:

set the htmlText of fld "fld" to URL ("file:" & it)

trying to "be clever" I changed it to:

set the htmlText of fld "fld" to the uniEncode of URL ("file:" & it)

and got DIFFERENT gobbledegook (sheer joy).

I changed things to this:

setthehtmlTextoffld "fld" touniEncode(URL ("file:" & it),"w")

and got a line of question marks ????????????????????????????

this:
setthehtmlTextoffld "fld" touniEncode(URL ("file:" & it),"Unicode") did 
the same,

this:
setthehtmlTextoffld "fld" touniEncode(URL ("file:" & it),"UTF8") gave me 
something
where about 90% of the text was displayed correctly; the rest was nonsense.

Richmond.



More information about the Use-livecode mailing list