Importing Unicode text to a field .. How?

Slava Paperno slava at lexiconbridge.com
Sat May 28 17:25:35 EDT 2011


Cool, jacque! I am impressed.

Just for my edification, how did you know that the original text was in
UTF16?

And if you knew that, maybe you also know why my attempts to
getRevBrowserGet(browserID, "selected") for Cyrillic text returns the
dreaded question marks? I posted this in the using Externals and Plugins
forum, as well as on this list, and no one responded.

I also got no responses to my question about sending messages from the Web
page in revBrowser back to the stack (same forum)... I guess not many
experts use LC with Unicode... and the famous Tim Bobo is probably on
vacation...

Gratefully,

Slava

> -----Original Message-----
> From: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
> bounces at lists.runrev.com] On Behalf Of Web Admin Himalayan Academy
> Sent: Saturday, May 28, 2011 4:56 PM
> To: How to use LiveCode
> Subject: Re: Importing Unicode text to a field .. How?
> 
>   Sweet Mangos! It works (smile)
> 
> I was very close.. in fact I thought I had tried that before.
> Interesting that you cannot do the replacement in the field itself, you
> have to do it to the data in the variable *before* you pass it to the
> field.  because
> 
> replace numtochar(13) with numtochar(10) in fld "unicode_Script"
> 
> does not work.
> 
> Thanks Jacque
> 
> Sivakatirswami
> 
> 
> On 5/27/11 7:10 PM, J. Landman Gay wrote:
> > It was close though. LiveCode uses ascii 10 instead of ascii 13 for
> > line endings. Those are converted automatically when you paste, but
> > not when you put text into a field by script. So just replace cr with
> > unix line endings and it works:
> >
> > on mouseUp
> >   set the textfont of fld 1 to "InaiMathi,Unicode"
> >   answer file "Choose the Unicode for this song" with "OK"
> >   if the result <>"cancel" then
> >     get url ("binfile:" & it)
> >     replace numtochar(13) with numtochar(10) in it
> >     set the unicodetext of fld 1 to it
> >   end if
> > end mouseUp







More information about the use-livecode mailing list