Special Characters between AppleScript/Perl
Special Characters between AppleScript/Perl
- Subject: Special Characters between AppleScript/Perl
- From: <email@hidden>
- Date: Mon, 22 Mar 2004 11:23:47 -0800 (PST)
All,
I'm having a problem maintain special characters when working between
AppleScript and Perl Script.
I have a combo Perl Script and AppleScript (for iTunes) that I have doing the
following logic:
1) Perl script executes an AppleScript that dumps the entire iTunes Library
(Database ID and Song Location)
2) Perl script parsers through this and does various things to generate tagging
information.
3) Perl script sets environment variables and then executes another AppleScript
that reads them and sets various tags on all the songs.
The problem I'm having is when filename's contain special characters.
Specifically it's the "squared" character of "2".
The AppleScript that is reading out from iTunes gets the song name by doing a
"(location of currentTrack) as Unicode text" on the track in iTunes. This is
preserving the special character correctly.
After Perl does it's processing I am passing it back into to another
AppleScript though an environment variable.
In Perl: $ENV{taggerName} = $songRef->{name};
In AppleScript: set taggerName to system attribute "taggerName"
At this point the special character (the squared character) is read in the
AppleScript as ",≤" instead of "2"
-jdr
_______________________________________________
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.