Actionable Messages not displaying regional (UTF-8) characters

大兔子大兔子 提交于 2019-12-11 17:09:54

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!