unicode files? open file for text or binary?

Kee Nethery kee at kagi.com
Fri Jan 8 19:11:49 EST 2010


Mark, thank you for the answer. 

Kee Nethery


On Jan 8, 2010, at 4:04 PM, Mark Schonewille wrote:

> Kee,
> 
> Read the data as binary. Use the BOM to detect UTF8/UTF16/UTF32 and the endian. If necessary, switch the bytes to change the endian. Delete the BOM and set the unicodeText of a field to the remaining data.
> 
> --
> Best regards,
> 
> Mark Schonewille
> 
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> 
> We make software, websites and webware. We are always looking for new projects. Feel free to contact us and ask for a quote without any further obligations
> http://economy-x-talk.com/contact.html
> 
> Op 9 jan 2010, om 00:57 heeft Kee Nethery het volgende geschreven:
> 
>> I want to open a unicode file and read it. It has a BOM at the front to indicate what kind of encoding it uses (in this case UTF-16). Do I open this as a text file and read it and unicode goodness happens? Or is it a bunch of binary data that I need to somehow convert into unicode values (ug)?
>> 
>> Kee Nethery
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




-------------------------------------------------
I check email roughly 2 to 3 times per business day. 
Kagi main office: +1 (510) 550-1336





More information about the use-livecode mailing list