• 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
Re: Odd File Write Issue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Odd File Write Issue


  • Subject: Re: Odd File Write Issue
  • From: Luther Fuller <email@hidden>
  • Date: Sat, 05 Dec 2009 14:09:09 -0600

On Dec 5, 2009, at 1:13 PM, andy knasinski wrote:

We're doing some text manipulation and then writing it to disk. For one client, on an older PPC mac with 10.4.11 they are getting ASCII null characters between every character written to disk. If I look at the string being written, it's correct (no nulls) but on disk it has them.

What would cause this to happen!?

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
end write_to_file

I haven't the slightest idea, but try ...

write (this_data as text) to the open_target_file starting at eof

and let us know what happens. I'm just curious.

 _______________________________________________
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/archives/applescript-users

This email sent to email@hidden

References: 
 >Odd File Write Issue (From: andy knasinski <email@hidden>)

  • Prev by Date: Odd File Write Issue
  • Next by Date: Re: Odd File Write Issue
  • Previous by thread: Odd File Write Issue
  • Next by thread: Re: Odd File Write Issue
  • Index(es):
    • Date
    • Thread