Thanks for the info.
I did some further testing as I wanted to see if I was writing an odd character I didn't know about. Turns out the offending character is one created by PM itself.
When ingesting, I write all my camera info and some file info to one unused field. One of the things I write is {time}.
Lets say {time} writes "2:49:25 PM". The specific character that causes the error is the space between the number and the "5" and the "PM". I systematically deleted every metadata entry until the only thing left was that space, and I would still get the error. As soon as the space was deleted, no error.
As mentioned, “Write IPTC as Unicode” solved it, and it's easy enough for me to modify my template to use {hour}:{minute}:{second} {ampm} instead, which doesn't cause the error. But I figured you should know as it seems weird that it is coming from a variable. Again this only popped up recently and I've been using the same template for a few years now.
Might not be relevant, but in case this helps... at one point I copied the "2:49:25 PM" text into Apple's TextEdit and noticed that the offending space showed as being in Helvetica font, whereas the rest of the text was shown in the default font I have set for TextEdit.