Importing Unicode text to a field .. How?

Mark Schonewille m.schonewille at economy-x-talk.com
Wed May 25 05:45:36 EDT 2011


Hi Sivakatirswami,

Maybe you need to replace the cr's: replace uniencode(numtochar(13)) with uniencode(numtochar(10)). Just a guess.

--
Kind regards,

Mark Schonewille
Economy-x-Talk
Http://economy-x-talk.com

Share the clipboard of your computer over a local network with Clipboard Link http://clipboardlink.economy-x-talk.com


Op 25 mei 2011 om 07:17 heeft Sivakatirswami <katir at hindu.org> het volgende geschreven:

> Namaste, Slava:
> 
> I tried that too, but I lose all the CR's...I get one long line in the LiveCode field, but if I paste it here into the email  the CRLF's come back!
> 
> Or if I copy from Pages.. the CR's are preserved...
> 
> If I try to process the CR in the usual way, I get them back in the field but the text becomes garbled again
> 
> on mouseup
>   answer file "Choose the Unicode for this song" with "OK"
>   put url ("binfile:/" & it) into tUnicode
>   set the useUnicode to true
>  set the unicodetext of  fld "Unicode_Script" to  tUnicode
> end mouseup
> 
> #  THE FOLLOWING IS A SINGLE LINE IN THE LC FIELD:
> 
> Converted from மயிலை text in /Users/sivakatirswami/Documents/Tamil/Natchintanai in Unicode/3 Thannai Thannaal.txt தன்னைத்தன்னால்தன்னைத் தன்னால் அறிந்திட வேண்டுமேதானா யெங்குஞ் செறிந்திட வேண்டுமே[snip]
> 
> on mouseup
>   answer file "Choose the Unicode for this song" with "OK"
>   put url ("binfile:/" & it) into tUnicode
>   set the useUnicode to true
>  set the unicodetext of  fld "Unicode_Script" to  tUnicode
>  replace numtochar(13) with numtochar(10) in fld "unicode_Script"
>   # the above line restores the line breaks but destroys the text... or rather, converts it to some other encoding displays Japanese characters
> end mouseup
> 
> C
> _______________________________________________
> 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