I have been told that Applescript 2.2.1 is fully UTF-8 compliant. Can anyone explain why I am having the following results?
tell application "iTunes" to set theArtist to artist of track 1 of playlist "TestUTF8" -- theArtist = Beyoncé
do shell script "touch ~/Desktop/result.txt"
do shell script "echo " & theArtist & " >> ~/Desktop/result.txt"
--> result.txt file contains a garbled character --> Beyoncé
tell application "TextEdit" to set theArtist to word 1 of paragraph 1 of document 1 -- theArtist = Beyoncé
do shell script "touch ~/Desktop/result.txt"
do shell script "echo " & theArtist & " >> ~/Desktop/result.txt"
--> result.txt file contains a garbled character --> Beyoncé
What happened to that UTF-8 special character when writing out to the file?
Thanks,
John Mistler