web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

How to display special characters (umlaute ä/ö/ü) in a Email?

(0) ShareShare
ReportReport
Posted on by 397 User Group Leader

Does anyone have the same issue?

pastedimage1660047874680v1.png

The Email - body is created from a report via Report.SaveAs()

 TempBlobMailBody.CreateOutStream(BodyOutStream);
     Report.SaveAs(MailID, XMLParameters, ReportFormat::Html, BodyOutStream, RecRef);
         TempBlobMailBody.CreateInStream(BodyInStream);
             BodyInStream.ReadText(BodyTxt);

My settings are set to Germany/German...

Thank you.

Tom

I have the same question (0)
  • Verified answer
    T_Mauser Profile Picture
    397 User Group Leader on at
    RE: How to display special characters (umlaute ä/ö/ü) in a Email?

    Ok, I found the solution:

    You have to use the parameter TextEncoding::UTF8 in the Codeunit "Temp Blob" like this:

    TempBlobMailBody.CreateInStream(BodyInStream, TextEncoding::UTF8);

    Now everything works ;)

    Tom

  • ZSafar Profile Picture
    10 on at
    RE: How to display special characters (umlaute ä/ö/ü) in a Email?

    Hi Tom,

    it works in mail subject (Betreff) to?

    In my case it works in body but not in subject :-(

    Tnx

    Zac

  • T_Mauser Profile Picture
    397 User Group Leader on at
    RE: How to display special characters (umlaute ä/ö/ü) in a Email?

    Hello, I think the subject field is from Typ "Text" - Do you want to use a BLOB-Typ for the subject field?

  • ZSafar Profile Picture
    10 on at
    RE: How to display special characters (umlaute ä/ö/ü) in a Email?

    Hi Tom,
    tnx for the fast replay.
    I have used the same logic as for the body.
    There is the code:

    ----------------------------------------------------------
    CLEAR(TempBlob);
    TempBlob.WriteAsText(GetSubjectText(EmailDistributionSetupLine,TempDistributionEntry),TEXTENCODING::UTF8);
    TempEmailItem.Subject := GetFormattedDocumentSubjectText(TempBlob);

    --------------------------------------------------------------
    LOCAL GetFormattedDocumentSubjectText(VAR TempBlob : TEMPORARY Record TempBlob) : Text
    IF TempBlob.Blob.HASVALUE THEN BEGIN
    TempBlob.Blob.CREATEINSTREAM(InStr);
    StreamReader := StreamReader.StreamReader(InStr,Encoding.UTF8);
    EXIT(StreamReader.ReadToEnd);
    END;
    ----------------------------------------------------------------
    The funny thing is, it works at the other customer. :-)
    Maybe is the problem in customer mail server setup. I do not know... I asked him and he said that is OK.

    LG Zac

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,808

#2
Sumit Singh Profile Picture

Sumit Singh 2,554

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,140

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans