1 person found this helpful
The strange codes you are seeing are in UTF-8 encoding, which is (likely) the encoding of your script and not that of InDesign. The InDesign part should be working just fine, it's the script that feeds those bad codes into it.
Can you shorten up your script to a minimum that still does it wrong?
Thanks for the idea!
I think it has to do something with the way InDesign tries to read my data file (or script).
I placed "™" character inside comments right at the top of the file, and everything works
I would play around and try to find some saner solution, but the deadline for my project is way too close
Makes sense why adding characters would break things. The parser scans first X characters of the file to guess the encoding, and when ™ and other stuff appear only later in the file, it guesses incorrectly.
You shouldn't be gueesing encoding.
You should either write the unicode marker or define your file encoding:
myFile.encoding = "UTF-8";
That fixed the problem. I'll be sure to keep encoding in mind for all my files.