• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Help with writing to a file --- weird characters.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with writing to a file --- weird characters.


  • Subject: Help with writing to a file --- weird characters.
  • From: RH <email@hidden>
  • Date: Wed, 7 Feb 2007 15:44:22 -0500

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-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Help with writing to a file --- weird characters.
      • From: Shane Stanley <email@hidden>
  • Prev by Date: [ANN] A new environment of widgets.
  • Next by Date: Re: Getting started with XML?
  • Previous by thread: Re: [ANN] A new environment of widgets.
  • Next by thread: Re: Help with writing to a file --- weird characters.
  • Index(es):
    • Date
    • Thread