creating a Unicode (UTF-8) file using open/write/close file
lists at mangomultimedia.com
Wed Sep 24 14:27:01 EDT 2003
I have a program which creates a XML file that is then used by a Flash
movie to create a menu. Flash MX supports Unicode text and so I am
working on creating a Unicode (UTF-8) xml file which Flash can use.
I create a sample XML file in BBEdit and set the file to UTF-8 encoding
and was able to enter Japanese characters along with ASCII characters
without a problem. This was parsed without a problem by Flash.
I tried to create a file from Rev by pasting the contents of the XML
file I made in BBEdit into a field and using the following code:
open file tPath for write (also tried open file tPath for binary write)
write unicodeText of field 1 to file tPath
close file tPath
The Japanese characters were turned into garbage characters when I
opened the file in BBEdit. Is it possible to write a UTF encoded text
file with Rev? If so, how?
Some info on the unicode xml files that Flash MX supports:
Blue Mango Multimedia
trevor at mangomultimedia.com
More information about the Use-livecode