r/applescript • u/spenney09 • Mar 01 '26
AppleScript and accented characters
Short version of my 2 questions:
- Why is AppleScript able to copy and paste some accented characters flawlessly (à, é, è, for example) and not others (â, ä, ç, ê, ë, etc)?
- What workaround can I use to have AppleScript copy and paste these "difficult" characters?
Longer version:
I have two apps open: Excel and HotPotatoes (a Windows app that I'm running under Wine). I often copy and paste French text from Excel to HotPotatoes. I can manually copy and paste any accented character flawlessly. However, if I write an AppleScript to do the heavy lifting for me, it will happily copy and paste à, é, and è, but it will paste a letter "a" for any other accented character like â, ç, ê, œ, etc. Words like: pâte, avançons, boîte, sœur, all come out as: pate, avanaons, boate, saur!
- Why is that?
- Is there any workaround in AppleScript for this anomaly? My only workaround is to first change the difficult accented characters to html code (HotPotatoes produces .html pages from my input): pâte, avançons, boîte, sœur, etc.
2
u/JollyRoger8X Mar 01 '26
All of that and you didn't bother to post the script so we can see what it's doing? 🤦♂️