Autohotkey ComObjActive Outlook 变音符号编码错误

Autohotkey ComObjActive Outlook wrong encoding of umlauts

目前我使用 Autohotkey 预填充带有文本和附件的电子邮件。

tml_body=
  (
  <html>
    <body>

      test

    </body>
  </html>
  )

m := ComObjActive("Outlook.Application").CreateItem(0)
m.Subject := "subject with umlauts äüö "
m.To := "foo@bar.com"
m.CC := "foo@bar.com"
m.HTMLBody := html_body
m.Display
;m.attachments.add("filepath")

WinWait Untitled - Message (HTML)
WinActivate Untitled - Message (HTML)

使用此脚本打开一个新的 outlook 邮件,主题如下 "subject with umlauts äüö " 在 hmtlbody 中,类似 &uuml; 的内容有效,但在主题中无效。

如何设置或编码主题以正确显示特殊字符/变音符号?

尝试以 UTF-8 格式保存代码。

例如

  • 在记事本中选择文件 --> 另存为... --> 编码 --> UTF-8
  • 在 Notepad++ 中选择编码 --> 以 UTF-8 编码