function textEncode() in LC7

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
atout66
Posts: 266
Joined: Wed Feb 02, 2011 12:31 pm
Location: France

function textEncode() in LC7

Post by atout66 » Wed Apr 02, 2014 4:09 pm

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.
Discovering LiveCode Community 6.5.2.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”