### Steps to reproduce Follow Up to #6962 reported by @kesselb [here](https://github.com/nextcloud/mail/pull/6812#discussion_r947279039) This email [mail_5322.txt](https://github.com/nextcloud/mail/files/9354885/mail_5322.txt) uses a weird encoding. It breaks the updatePreviewDataBulk process for me and rollback all changes. The following code made it work. I'm not 100% sure if that's not a problem with my dev setup somehow. ```php $previewText = $message->getPreviewText(); if ($previewText !== null) { $previewText = mb_strcut(mb_convert_encoding($previewText, 'UTF-8', 'UTF-8'), 0, 255); } ``` ### Expected behavior The preview text is parsed correctly. ### Actual behavior Some encodings cause the preview text to fail. ### Mail app version 1.14.0-alpha5 ### Mailserver or service _No response_ ### Operating system _No response_ ### PHP engine version _No response_ ### Web server _No response_ ### Database _No response_ ### Additional info _No response_
Activity
ChristophWurst commentedon Aug 30, 2022
Let's do that.Done. I had a stash somewhere with a similar solution. Anything non UTF-8 can be discarded.