EML to MSG Conversion Issue in C#: Unicode Encoded Subject Not Properly Handled

Hello,

We have an issue with EML to MSG conversion when the subject contains unicode characters.
Conversion is successful but the subject in the MSG file is incorrect.
For example, the subject “DSI_SINIV_01 (Modèle de test)” is converted to “DSI_SINIV_01 (Modèle de test)” in the MSG file.

We use the following code to perform the conversion :

    private IEnumerable<byte[]> ConvertEmlToMsg(ConvertFileRequestDto p_FichierSource)
    {
        List<byte[]> result = new List<byte[]>();

        SetLicense();

        using (MemoryStream documentSource = new MemoryStream(p_FichierSource.Content))
        {
            Func<Stream> stream = () => documentSource;

            // Create ConverterSettings and specify logger.
            Func<ConverterSettings> settingsFactory = () => new ConverterSettings
            {
                Logger = new CustomGroupDocsLogger()
            };

            Func<LoadOptions> loadOptionsFactory = () => 
            {
                return new EmailLoadOptions
                {
                    // Conversion du conteneur (= objet et corps de mail)
                    ConvertOwner = true,
                    // Les pièces jointes sont conservées dans leur format d'origine
                    ConvertOwned = false,
                    Depth = 1,
                    DisplayCcEmailAddress = true,
                    DisplayBccEmailAddress = true
                };
            };

            using (Converter converter = new Converter(stream, loadOptionsFactory, settingsFactory))
            {
                EmailConvertOptions convertOptions = new EmailConvertOptions
                {
                    Format = EmailFileType.Msg
                };

                using (MemoryStream output = new MemoryStream())
                {
                    converter.Convert(() => output, convertOptions);
                    result.Add(output.ToArray());
                }
            }
        }

        return result;
    }

And here is a sample EML file :

Date: Thu, 8 Feb 2024 13:49:38 +0100 (CET)
From: sender@domain.fr
To: test@domain.fr
Subject: =?utf-8?B?RFNJX1NJTklWXzAxIChNb2TDqGxlIGRlIHRlc3Qp?=
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

This is a test message.

@michel.nedelec
This issue is reproduced at our end. Therefore, we have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): CONVERSIONNET-6651

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

The issues you have found earlier (filed as CONVERSIONNET-6651) have been fixed in this update. This message was posted using Bugs notification tool by nikola.yankov