What to do if sanitized emails are displaying “?” in email body?
Check Your Version:
This article applies to all MetaDefender Email Gateway Security releases deployed on Windows systems. The “Prioritize header charset setting in HTML” option is available in the Management Console from version 5.7.3.
Issue:
Some emails processed by MetaDefender Email Gateway Security (EGS), typically with Deep CDR sanitizing the HTML body, are delivered with “?” characters:
at the very beginning of the email body, or
in place of non-English characters, such as Hebrew, Japanese or Cyrillic text.
The same email displays correctly before it is processed by EGS.
Cause:
An email can declare its character set in two places: the MIME header of the body part, and the <meta charset> tag inside the HTML. When the two disagree (for example, the header says UTF-8 and the meta tag says us-ascii), EGS uses the charset from the HTML meta tag by default. If that charset cannot represent the text, the affected characters are replaced with “?”.
In EGS 5.7.5 and earlier, Deep CDR could also return the sanitized HTML as UTF-8 with a byte order mark (BOM), which EGS did not handle correctly. This produced a “?” at the start of the email body. It is fixed in 5.7.6.
Resolution:
Upgrade to the latest EGS release. The minimum recommended versions are 5.7.6 (v5) or 6.2.0 (v6). In 6.1.1 and 6.1.2, enabling the option below could cause Central European (Windows-1250) characters to display incorrectly. This is fixed in 6.2.0.
Enable the option. In the EGS Management Console, go to General > Settings, enable Prioritize header charset setting in HTML, and save. EGS then uses the charset from the email header instead of the HTML meta tag.

Note:
This option fixes how EGS interprets conflicting charset declarations. It cannot repair text that was already corrupted before reaching EGS, for example by an upstream mail gateway that modified the email body. If the text still shows garbled character sequences after enabling the option, compare with a copy of the email taken before EGS to find where the damage occurs.
If Further Assistance is required, please proceed to create a support case or chat with our support engineer.