• 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: Do shell script and special characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do shell script and special characters


  • Subject: Re: Do shell script and special characters
  • From: Helmut Fuchs <email@hidden>
  • Date: Mon, 21 Oct 2002 22:32:53 +0200

At 12:02 Uhr -0700 21.10.2002, Chris Espinosa wrote:
Doing a 'cat' of a file that doesn't contain UTF-8 is just like doing a 'cat' of a binary file; you get garbage -- in most cases, illegal UTF-8.

That's exactly the problem. 'cat' simply does binary output. The shell _interprets_ its output as UTF-8. And there was garbage...

There's no obvious way to read anything into AppleScript without translation. Why does AppleScript _force_ data to take make a detour through the shell in that limiting way? At times AppleScript is far too patronizing!

I've always found that "do shell script" is kind of awkward. You don't have control of what really makes up the power of the shell - STDIN, STDOUT and STDERR are hidden behind layers of (possibly) unwanted translations.

I really would like to be able to open real pipes from AppleScript and handle input and output to other scripts via file I/O.

UNIX is all about control. AppleScript's automatic coercions are for simplicity. That's a culture clash, and I think that anybody who is able to cough up shell scripts should be trusted to do his/her coercions on his/her own! Or at least be ALLOWED to do them byself.

And I wish, for that among other reasons, that a binary block data type should finally be invented for AppleScript, which should allow for conversions from mere bytes into various other data formats (e.g. string encodings) and back. Then AppleScript could finally become a hub, where software of different cultural backgrounds neatly finds together.

Regards,

Helmut

P.S. Thanks to Chris Espinosa (and other team members) for taking part in these discussions. It's a relief to hear that at least the AppleScript team seems to be interested in what users think.
--
_______________________________________________
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.
  • Follow-Ups:
    • Re: Do shell script and special characters
      • From: Shane Stanley <email@hidden>
  • Prev by Date: OS X Server
  • Next by Date: Re: OS X Server
  • Previous by thread: Re: Do shell script and special characters
  • Next by thread: Re: Do shell script and special characters
  • Index(es):
    • Date
    • Thread