Since it’s working for me in Ignition 8, now we’re at the hard part of solving this.
First, let’s try to cut the problem in half. Can you take the same script, but instead of creating an email, make the subject and attachment name show in a label in a Vision window? (Not the script console, which doesn’t always show unicode correctly). That will let us know that the characters are getting to the email correctly.
If the subject and attachment names show correctly in Vision, we want to find out what the gateway sees as the subject when it sends the email. This will take a little work, because we need to trigger a particular logging statement. (Note to self – we should improve the logging here) To do this, send your email to an obviously invalid user, which hopefully your SMTP server will reject rather than just quietly ignore. For example,
user@thing (ie no
.com at the end) might trigger this. Set the
SMTP.Manager logger in the gateway to debug, make sure you use a
retries value greater than 0, and hopefully we will see a logging statement telling you the email failed. That logging statement will include the subject of the email. You can filter down to that logger in the gateway to make it easier to find.
If the logging statement shows the correct subject, then this unicode failure is probably after the email leaves Ignition. You would need to check the settings on the SMTP server being used. (I’m assuming the email clients receiving the email normally show unicode subjects just fine.)