15 November 2017

Exchange 2016: How to force it use UTF-8 encoding

In order to minimize the number of possible problems with message encode (e.g. "?" instead of Cyrillic symbols), I recommend to set up an unified universal encoding in the Exchange - UTF-8.

Quotation from the TechNet article regarding choosing encoding for outgoing emails:
"Exchange uses the order of precedence as described in the following list to determine the message encoding options for outgoing messages sent to recipients outside the Exchange organization"

1. Mail user or mail contact settings

There are no specific attributes to determine encoding for MailContact and MailUser.

2. Outlook or Outlook Web App settings

The most convenient way to configure user's Outlook is using GPO. There are two options: Administrative Templates and registry.

Administrative Template:

User Configuration/Policies/Administrative Templates/Microsoft Outlook 201*/Outlook Options/Mail Format/International Options | Auto-select encoding for outgoing messages -> Enabled
User Configuration/Policies/Administrative Templates/Microsoft Outlook 201*/Outlook Options/Mail Format/International Options | Encoding for outgoing messages -> Enabled + "Unicode (UTF-8)"
User Configuration/Policies/Administrative Templates/Microsoft Outlook 201*/Outlook Options/Mail Format/International Options | Euro encoding for outgoing messages -> Enabled + "Send messages as UTF 8"

BUT in my case Administrative Template (for 2013 and 2016 versions) works unexpectedly (tested in three environments) and the "Auto-select encoding for outgoing messages" is always Disabled.


Registry

So, I decide to do it by registry:
"User Configuration\Preferences\Windows Settings\Registry\Software\Microsoft\Office\1*.0\Outlook\Options\MSHTML\International\", "autodetect_codepageout" = 1 (REG_DWORD)
"User Configuration\Preferences\Windows Settings\Registry\Software\Microsoft\Office\1*.0\Outlook\Options\MSHTML\International\", "autodetect_ignoreeuro" = 0 (REG_DWORD)
"User Configuration\Preferences\Windows Settings\Registry\Software\Microsoft\Office\1*.0\Outlook\Options\MSHTML\International\", "default_codepageout" = 65001 (REG_DWORD)


And now Outlook looks good, as I expected.


Configure OWA (Outlook on the Web):

Get-OwaVirtualDirectory | Set-OwaVirtualDirectory -OutboundCharset AlwaysUTF8
iisreset /noforce

3. Remote domain settings

Get-RemoteDomain | Set-RemoteDomain -CharacterSet utf-8 -NonMimeCharacterSet utf-8

The list of supported Charsets for Remote Domain- https://technet.microsoft.com/en-us/library/aa998600(v=exchg.150).aspx

In addition - A few tests showing how Outlook selects the encoding

There are 3 type of test: default (#1-4), with UTF-8 and disabled auto-selecting and UTF-8 (#5-10) and enabled auto-selecting (#11-16). So, if you disable "Auto-select encoding for outgoing message" UTF-8 will be used only for new emails (#5-8), and for reply emails Outlook will leave the original encoding (#9-10).

# Outlook - Auto-select encoding for outgoing messages Outlook - Encoding for outgoing messages Email type (New, Reply) Email format Email text Encoding
1 Yes Western European (ISO) New html English Western European (ISO)
2 Yes Western European (ISO) New html Russian KOI8-R
3 Yes Western European (ISO) New html Russian + Spec Symbols UTF-8
4 Yes Western European (ISO) New html Russian + Italyan KOI8-R
5 No UTF-8 New html English UTF-8
6 No UTF-8 New html Russian UTF-8
7 No UTF-8 New html Russian + Spec Symbols UTF-8
8 No UTF-8 New html Russian + Italyan UTF-8
9 No UTF-8 Reply to Western European (ISO) html Russian Western European (Windows)
10 No UTF-8 Reply to KOI8-R html Russian KOI8-R
11 Yes UTF-8 New html English UTF-8
12 Yes UTF-8 New html Russian UTF-8
13 Yes UTF-8 New html Russian + Spec Symbols UTF-8
14 Yes UTF-8 New html Russian + Italyan UTF-8
15 Yes UTF-8 Reply to Western European (ISO) html Russian UTF-8
16 Yes UTF-8 Reply to KOI8-R html Russian UTF-8

4 comments:

  1. Set-RemoteDomain <--this should be get-remotedomain? | Set-RemoteDomain -CharacterSet utf-8 -NonMimeCharacterSet utf-8

    ReplyDelete
  2. Hi. I am a zero expert in this issue. I find my outlook (office 16) Windows 10 -64 bit) International options "Prefered encoding for outgoing messages:"is set to "Western European ISO". I live in the US and do not deal with Western European countries. Should I be changing this setting to UTF-8? What will be affected? Also, 'Preferred encoding for outgoing vCards is set to Western European (windows). Are these settings standard? Also I read somewhere that depending on what option I choose here I would be able to set the character length of the lines on my outgoing emails... currently, even tho I have set the character count per line to 70... it totally ignores it. So printing emails is disastrous, because they do not fit in a normal paper size. Any help/explanation would be greatly appreciated.

    ReplyDelete
    Replies
    1. Hi.
      Thanks for your comment. Yes, it's default settings.
      "By default, Outlook sets preferred encoding to a popular Internet encoding corresponding to the active Microsoft Windows code page of the user's computer. For example, Outlook specifies Western European (ISO) when it runs on Western European Latin1 Windows code page 1252."
      More details regarding Outlook and encoding you can find there - https://docs.microsoft.com/en-us/previous-versions/office/office-2007-resource-kit/cc179149(v=office.12)

      Regarding wrapping text - I guess it should work only in Plain text format (not HTML). Here is the link to an article for probably your issue - https://www.msoutlook.info/question/wrap-text-automatically-doesnt-work
      All the best.

      Delete