Importing Unicode text to a field .. How?

J. Landman Gay jacque at hyperactivesw.com
Sun May 29 00:12:45 EDT 2011


On 5/28/11 10:22 PM, J. Landman Gay wrote:
> On 5/28/11 4:25 PM, Slava Paperno wrote:
>> Cool, jacque! I am impressed.
>>
>> Just for my edification, how did you know that the original text was in
>> UTF16?
>
> I'm afraid it won't help with your scripting. I just opened the file in
> BBEdit, it tells you what the encoding is.

I just looked it up on Wikipedia and saw that I could have done it in 
LiveCode. The first 2 characters of the files had a BOM (byte order 
mark). If you get the chartonum of those, you'll get 255 254 for little 
endian and 254 255 for big-endian. The occurance of either set means it 
is UTF-16. By convention, a UTF-8 file doesn't use a BOM.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list