I'm using the folowing code to write some text to a file.....
kittens
In text edit the file looks fine however when I read it with a unix utility I get
^@k^@i^@t^@t^@e^@n^@s
I'm not sure what is going on.
on write_to_file(this_data, target_file, append_data) try set the target_file to the target_file as text set the open_target_file to ¬ open for access file target_file with write permission if append_data is false then ¬ set eof of the open_target_file to 0 write this_data to the open_target_file starting at eof close access the open_target_file return true on error try close access file target_file end try return false end try
|