Re: Folder Action the Cocoa Way
Re: Folder Action the Cocoa Way
- Subject: Re: Folder Action the Cocoa Way
- From: Uli Kusterer <email@hidden>
- Date: Mon, 26 Jun 2006 18:18:45 +0200
Am 26.06.2006 um 16:48 schrieb John Stiles:
Uli Kusterer wrote:
Am 26.06.2006 um 01:05 schrieb John Stiles:
I will warn you that if the path can have non-ASCII characters in
it—and this can be true even on American systems, if your users
have creative hard drive names—your script won't run.
AppleScript in general does an awful job with Unicode. This has
bit me in the past.
If you want a long version of this problem and an explanation:
<http://www.zathras.de/angelweb/x2005-03-10b.htm>
Interesting read, and an important warning... but it actually
didn't even mention the issue that I was referring to!
I was thinking more about folder or file names with 日本語
(Japanese) or other non-ASCII scripts in them.
There's no easy way to pass these paths into AppleScript at all;
they choke the compiler. You have to convert them to some
intermediate format that only uses ASCII.
(As I mentioned, file:// URLs are one way)
That "intermediate format" is called UTF8 and is what Mac OS X uses
internally to store file names. You can provide such a path by
specifying "posix path" in AppleScript.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden