Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with file writing in Applescript ---weird characters



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

-----

Robert Herbstzuber

WebSite: http://rjhcc.dyndns.biz

Email: email@hidden


PHP/MySql-Web Design-Desktop Consulting-Custom PC Building

------



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.