Page 1 of 1

function textEncode() in LC7

Posted: Wed Apr 02, 2014 4:09 pm
by atout66
Hi to all,
As Dave suggested me in my previous post (http://forums.runrev.com/viewtopic.php?f=7&t=19842) I upgraded to the LC7 version to be abble to use UTF8 without troubbles.
Reading the release note http://downloads.livecode.com/livecode/ ... 0_dp_1.pdf I see (page 13) that some functions I used are deprecated, like numToChar(), charToNum(), etc. So , I went to update my scripts.
In one of them really simple, I load a wiki page and show the source code in a field called "field_01".

Code: Select all

on mouseUp
   local laDef , laUrl
   set the text of field "field_01" to null
   wait 2 second -- to see the change
   put fld "recherche_def" into laDef -- the word we're looking for
   put "http://fr.wiktionary.org/wiki/" & laDef into laUrl
   put URL laUrl into Tsource
   --   set the unicodeText of fld "field_01" to uniEncode (Tsource, "UTF8") // deprecated !
   put textEncode(Tsource,"UTF8") into fld "field_01" -- updated for LC7. Doesn't work.
end mouseUp
As said in the script, my update dosen't work. I still see chars "?" instead of UTF8 chars.
What's wrong with this script ? Any idea ?

Thanks in advance for your help.