Importing Unicode text to a field .. How?
Web Admin Himalayan Academy
katir at hindu.org
Sat May 28 16:56:02 EDT 2011
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