Importing Unicode text to a field .. How?

Richmond Mathewson richmondmathewson at gmail.com
Sun May 29 14:24:07 EDT 2011


On 05/28/2011 11:56 PM, Web Admin Himalayan Academy wrote:
>  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.

Glad you worked that out, because I didn't.

>
> 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 
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list