Re: Do shell script and special characters
Re: Do shell script and special characters
- Subject: Re: Do shell script and special characters
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 21 Oct 2002 12:41:19 -0700
On 10/21/02 12:02 PM, "Chris Espinosa" <email@hidden> wrote:
>
If you want this bug fixed by this time next year (by our "shady" team
>
that actually does "give a damn") then I'd appreciate some
>
recommendations from you on what specific behavior you want when a
>
shell command produces illegal UTF-8 to be returned to AppleScript in a
>
string variable:
>
>
- Translate all illegal UTF-8 characters into "missing character"
>
symbols, a la what the Terminal does? (This is lossy and irreversable,
>
but won't error)
>
>
- Assume that an error in coercing shell output to styled text means
>
that it's supposed to be in current text encoding? (This will produce
>
unpredictable results on non-MacRoman files; sometimes you'll get one
>
form, sometimes another, depending on what data is in the file)
>
>
- Allow an 'as' or 'encoding' parameter on do shell script so you can
>
specify what encoding, if any, you expect the result to be in if it's
>
not UTF-8 (this would include 'as data' so you could, for instance, cat
>
a .jpeg file and get the raw .jpeg in an AppleScript data object)
The last one sounds good to me, with a default behavior clearly defined when
'as' is not used. I'm glad you're continually working on improvements.
--
Paul Berkowitz
_______________________________________________
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.