Hello! We’ve been using .NET version 17.1.0.0 and recently upgraded to 21.5.0.
When reading an mbox messages that do specify a charset, e.g. Content-Type: text/html; charset=“UTF-8”, the message body encoding appears to default to UTF-8 in version 17.1.0.0.
var reader = new MboxrdStorageReader(stream, false);
var message = reader.ReadNextMessage();
// message.BodyEncoding = {Encoding} null
// message.PreferredTextEncoding = UTF8Encoding
// message.Body = 🥔
When reading the same mbox message in version 21.5.0, the message body encoding defaults to SBCSCodePageEncoding (iso-8859-1).
var reader = new MboxrdStorageReader(stream, false);
var message = reader.ReadNextMessage();
// message.BodyEncoding = SBCSCodePageEncoding
// message.PreferredTextEncoding = SBCSCodePageEncoding
// message.Body = 🥔
This causes the body to be different after upgrading versions. Is it possible to set the encoding for MboxrdStorageReader much like other readers can with LoadOptions.PrefferedTextEncoding? Can this be added as a feature for MboxrdStorageReaderOptions?
Thank you.
mbox.zip (387 Bytes)