Skip to main content

Notifications

Announcements

No record found.

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

  • 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

  • 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,

    it works in mail subject (Betreff) to?

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

    Tnx

    Zac

  • 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

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 448 Super User 2025 Season 1

#2
Sagar Dangar, MCP Profile Picture

Sagar Dangar, MCP 358

#3
Mansi Soni Profile Picture

Mansi Soni 327

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans