What encoding does [your favorite text editor] say the .prtl is written with, BEFORE your changes?
In my research, TextEdit says the file is UTF-16. Textwrangler and BBEdit say UTF-16 Little Endian. The Mac terminal says UTF-16 Little Endian. So I changed my code to be UTF16LE and the file still crashes PPro.
outFile.encoding = "UTF16LE";
outFile.open("w", "TEXT", "????");
I'm still working on this issue.
I still cannot export a .prtl then edit the file in a text editor and re-import the file into PPro without PPro crashing.
Are there any known specs for a .prtl file?
Is anyone working with this same workflow?
There are no specs; it's not a documented or supported format.
Best approach to automagically updating titles, today = do the titles in AE, and send AE ExtendScript from a PPro panel (yep, it's possible) to make those changes.
Getting/setting the text from PPro's titles is high on the API request list.
Despite the PRTL claiming to be UTF-16, I think it's actually encoded as UTF-8.
I managed to modify a PRTL in TextWrangler and import into Premiere without it crashing by:
Copy-pasting the XML data into an empty document. TextWrangler auto-detects it as UTF-16. I manually change it to UTF-8 (but do not touch the XML declaration <?xml version="1.0" encoding="UTF-16" ?>).
When I save this as a PRTL, TextWrangler warns me about "Document encoding mismatch." but I save it anyway.
Premiere imports the PRTL without crashing.