问题
I have encountered a problem with viewing Actionable Messages. Regional characters are not showing correctly (? instead of the actual character), even though I've added information about UTF-8 encoding in meta
tag inside the email's HTML head:
<meta http-equiv="Content-Type"content="text/html;charset=UTF-8">
What's peculiar, however, is that characters render correctly when I put them into email body. Furthermore, putting even one character from, let's say, Japanese, makes all the Japanese characters in Actionable Message render correctly (but not, for example, cyrillic characters).
That makes me think, it's some issue with Outlook (both OWA and desktop) rendering messages, not the encoding itself. It appears as if Outlook automatically picks the character set that's minimal for properly displaying the message, but it doesn't detect Actionable Message contents' as part of message.
The workaround I have thought of so far is either putting regional characters into invisible div (so that they 'force' the charset):
<div style=\"display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;\">łśあД</div>
which looks really horrible, or adding backup message contents to HTML's body.
So my question is, is there any setting I am missing that doesn't render all UTF-8 characters properly, no matter the body?
I'm sending the messages via EWS Managed API. I've tried setting other charsets in meta tag.
回答1:
Could you try the same payload using the follow script to send via SMTP?
https://github.com/tony-zhu/SendActionableMessage
We did some internationalization tests with this script and all characters were correctly displayed.
来源:https://stackoverflow.com/questions/52076068/actionable-messages-not-displaying-regional-utf-8-characters