Re: Importing HTML UniCode text into LiveCode

2017-05-28 Thread Richmond Mathewson via use-livecode

Thanks a bucket: that hit the thing on the head first time.

Best, Richmond.

On 5/28/17 11:36 am, james--- via use-livecode wrote:

Try textDecode(thefilecontent, "UTF8") or maybe 'utf16' given this is what LC 
is using internally.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Importing HTML UniCode text into LiveCode

2017-05-28 Thread james--- via use-livecode
Try textDecode(thefilecontent, "UTF8") or maybe 'utf16' given this is what LC 
is using internally.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Importing HTML UniCode text into LiveCode

2017-05-28 Thread Richmond Mathewson via use-livecode
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.
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode