iTunes scripting api seems to have issues with unicode text
I have written some Applescript which interacts with iTunes through the normal iTunes scripting API. As I understand it, nowadays Applescript uses Unicode throughout. I am also given to understand that iTunes understands Unicode for things like track tags etc.
My code queries iTunes to look up tracks based on name, album and artist (these values are stored in variables). This works correctly for all regular data but if any of the text in these variables includes non-ascii data (for example the string 'Élan') encoded as Unicode/UTF-8 then it fails to find a match even though the track is there (search within iTunes itself finds it).
Is this some deficiency in the scripting API? Or do I have to do something special in order to get searches to work as expected when I pass in Unicode/UTF8 data?
Thanks for any pointers...
Chris