Re: Do shell script and special characters
Re: Do shell script and special characters
- Subject: Re: Do shell script and special characters
- From: John Delacour <email@hidden>
- Date: Sat, 19 Oct 2002 22:50:35 +0100
- Mac-eudora-version: 5.3a5
At 10:46 am -0500 19/10/02, Matthew Stuckwisch wrote:
do shell script "cat foo.txt"
do shell script "curl http://foo.bar.com/foo.txt"
Both of these error if the file contains any non-7 bit ASCII characters.
Yes. This is a very serious and annoying bug. Just how annoying it
is I will demonstrate with the shortest workaround I can manage for
AppleScript's inability to manage a simple task:
try
do shell script "perl -e 'print qq~\\x90~;'"
on error e
display dialog "
Can't. Trying something else" buttons "OK" default button 1
end try
set f to "" & (path to temporary items) & "junk.pl"
set fout to "" & (path to temporary items) & "junk.txt"
set fPOS to POSIX path of (path to temporary items)
set foutPOS to POSIX path of fout
open for access file f with write permission
set eof file f to 0
write "#!/usr/bin/perl" to file f
write (ASCII character 10) to file f
write "open FOUT, qq~>" & foutPOS & "~ ;J
print FOUT qq~\\x90~;" to file f
close access file f
(* tell application "Finder" to open file f *)
do shell script "cd '" & fPOS & "'; perl junk.pl"
read file fout
I expect this bug to exist this time next year unless by chance
someone from the shady AppleScript team reads this thread and
actually gives a damn. The last bug I reported formally (related to
this one) got me a reply after five weeks demonstrating quite clearly
that the "engineers" had not properly read the report and it took me
an hour to devise a method that would make it impossible for them to
avoid the issue.
JD
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.