Re: Do shell script and special characters
Re: Do shell script and special characters
- Subject: Re: Do shell script and special characters
- From: Simon Kornblith <email@hidden>
- Date: Sun, 20 Oct 2002 18:31:48 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/19/02 5:50 PM, "John Delacour" <email@hidden> typed away on
his (or her or its) keyboard producing the following output:
>
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.
I agree. This bug is definitely a pain. The problem is that AppleScript (as
of 1.9/OS 10.2) will try to convert back from UTF-8 whatever is returned by
the shell, so if what's returned isn't UTF-8, it will error. You could get
around this with:
do shell script "perl -e 'print qq~\x90~;' | native2ascii | native2ascii
- -reverse -encoding UTF8"
But this is very, very slow and gets rid of the output from stderr.
Personally, what annoys me is that it is impossible to pass high ASCII
characters to the shell with "do shell script". It was possible in AS
1.8.3/10.1.5 and earlier; now it encodes everything in UTF-8.
Simon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (Darwin)
Comment: EntourageGPG - <
http://entouragegpg.sf.net/>
iD8DBQE9sy6vZoUZrWul2vIRAtQzAKCfZUGZoOLqwUU4UBIy20rXpoo7egCcDQnE
6swxaHBSVuafL2mH/+Rlb40=
=xxGS
-----END PGP SIGNATURE-----
_______________________________________________
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.