nope... that replacement does nothing...

on mouseup
   answer file "Choose the Unicode for this song" with "OK"
   if the result ="cancel" then exit mouseup
   set the useUnicode to true
   set the unicodetext of fld "Unicode_Script" to url ("binfile:/" & it)
      # result: Tamil appears fine, but all one line

   replace numtochar(13) with numToChar(8232) in fld "Unicode_Script"
       #does nothing

end mouseup



for others who are interested in trying:

See if you can import any of these three files into a Live Code field (on the Mac you should have InaiMathi installed by default with the system, if you have Arial MS Unicode alive on the box it should also work.)

http://www.himalayanacademy.com/livecode/Unicode-Tamil.zip

has three files of "pure" unicode that works in all programs including LiveCode fields but only if you paste it in.

Goal: import by script.

Sivakatirswami




On 5/27/11 10:04 AM, Richmond Mathewson wrote:

Unicode text is double-byte stuff, while the CR and LF are single-byte things.

SO . . . double-byte strings SHOULD always consist of an even number of bytes,

AND, if a text field is flagged as containing unicodeText when the engine starts reading its contents
it will start taking "double-byte bites" of the string.

THEREFORE, inserting either numToChar(10) or numToChar(13) into a double-byte text will throw the engine out of kilter because it will start "biting" double-bytes "off".

TAKE A LOOK at this:

http://en.wikipedia.org/wiki/Newline

and, just possibly, you need to replace you CR/LF with :

numToChar(8232)

worth a try . . .


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to