Documentation Index

Fetch the complete documentation index at: https://kb.lasernetgroup.com/llms.txt

Use this file to discover all available pages before exploring further.

How Do I Force ContentType - Charset in Mails into UTF-8?

Prev Next

This article explains how to force ContentType - Charset in Mails into UTF-8.

The Mail/Exchange/Outlook Output Port analyzes the text in Mailbody and will automatically choose the best encoding and charset based on the characters used in a body. It auto-recognizes the language of characters. If a mix of languages is present, then UTF-8 is chosen as the charset. Otherwise, the most commonly used charset for email for a particular language is automatically used.

In some cases, the receiver Mail system requires UTF-8.

It is not possible to hardcode it to UTF-8, so we need to add a UTF-8 character in the text, and it has to be in the script to set it right. In script, it is possible to set a Unicode character; for example, a no-break space like this: \uFEFF.

So, if using HTML as the output on a sheet, you can add the extra character like this on a rearrange:

function AddUTFCharacter()
{
 var a = CurrentText;
 a = a + "\uFEFF"
 return a;
}

The result can be seen in receiving email by right-clicking in the mail body and choosing the view source.

Result without the script:

Result with the script:

Was this page helpful? Let us know at knowledgebase.feedback@lasernetgroup.com