Recently, we have a strange problem with Outlook that affects some users.
If some users automate Outlook Client to view backback / ReportItems returns in a shared mailbox, instead of returning the plain text of the message as indicated in the documentation, we will return a Unicode string that was parsed as a UTF-8 string - so it looks like Chinese.
Now I can get around this with some code, but an additional problem is that this change also occurs in Outlook, as well as for all users who have access to these mailboxes. The message itself, viewed in Outlook, looks like Chinese characters - the source code for unicode html is processed as UTF-8.
It seems like this might be a known issue, but I wanted to see if I could get some tips here.
We use the usual methods to access the report item:
For Counter as Integer = Inbox.Items.Count To 1 Step -1 Dim Report As Outlook.ReportItem = Inbox.Items(Counter) Dim Body As String = Report.Body
The last line is where we get the text adorned with errors. In VBA, he tries to parse it as ASCII and returns a large "?" while in .Net it returns a value parsed as UTF-8, and we get characters that appear in Chinese. In any case, the original report item in the inbox begins to appear as Chinese characters and continues to do so for all users of this mailbox.
Any ideas?
UPDATE: I would like to share with this update, as it seems that some people still see this.
I want to quickly emphasize that the encoding problem is well discussed here and that access to the body of the message through the code is covered and quite easy. However, the encoding problem continues to exist in the Outlook client and has never been resolved, and this problem has been my constant task. There must be some error in the .Body property, which pushes the encoding of the original message object on the Exchange server. Good luck to everyone who needs to solve this problem.
UPDATE AGAIN: The answer and a more detailed description of the problem are posted below and are selected as the answer.