Re: Coercing alias with foreign characters to Unicode text
Re: Coercing alias with foreign characters to Unicode text
- Subject: Re: Coercing alias with foreign characters to Unicode text
- From: "Nigel Garvey" <email@hidden>
- Date: Sun, 9 Oct 2005 17:58:33 +0100
Martin Fuhrer wrote on Sat, 8 Oct 2005 21:01:22 -0600:
>I'm trying to get the path of a file as follows:
>
>set myAlias to choose file
>set myPath to (myAlias as Unicode text)
(My copy of digest number 656 stops at this point, presumably in reaction
to the Czech characters in Martin's file name.)
I see from the Web archive that Paul B. has suggested using the Finder to
get the name of the file and concatenating that to a Unicode coercion of
the container folder. Fooling around with that a bit more, its seems that
the Finder can do the entire coercion via one of its references
set myAlias to (choose file)
tell application "Finder"
set myPath to (file myAlias) as Unicode text
end tell
display dialog myPath
The effect in Tiger is as Paul describes: the letters alternate with the
carons in Script Editor's result window, but display correct with
'display dialog'. In Jaguar, it's the other way round!
NG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden