Sicos1977 / MSGReader

C# Outlook MSG file reader without the need for Outlook
http://sicos1977.github.io/MSGReader
MIT License
489 stars 168 forks source link

Japanese subject sometimes fail to parse #383

Closed NagayamaToshiaki closed 9 months ago

NagayamaToshiaki commented 10 months ago

Describe the bug Long mail subjects written in Japanese sometime produces gibberish, because subject are divided in chunks.

To Reproduce

  1. Make an EML file with subject such as "【要確認】●普通自転車(ノーパンクタイヤ) 再予約通知 2023/11/29 12:00 - 13:00".
  2. open the file with MsgReader.Mime.Message.Load(file).
  3. the Subject property is "【要確認】●普通自転車(ノーパンクタイヤ) 再予約通�� 2023/11/29 12:00 - 13:00"

The subject of the original EML is: =?utf-8?B?44CQ6KaB56K66KqN44CR4peP5pmu6YCa6Ieq6Lui6LuK77yI?= =?utf-8?B?44OO44O844OR44Oz44Kv44K/44Kk44Ok77yJIOWGjeS6iOe0hOmAmuef?= =?utf-8?B?pSAyMDIzLzExLzI5IDEyOjAwIC0gMTM6MDA=?=

Each segment can be translated like "【要確認】●普通自転車(", "ノーパンクタイヤ) 再予約通�", "� 2023/11/29 12:00 - 13:00". There are UTF-8 fragments of the character "知" in the end of the second segment and the first of the third segment.

Expected behavior The Subject should be "【要確認】●普通自転車(ノーパンクタイヤ) 再予約通知 2023/11/29 12:00 - 13:00"

Desktop (please complete the following information):

Additional context Using .NET Framework 4.6.2

Sicos1977 commented 9 months ago

Can you sent me the file?

Sicos1977 commented 9 months ago

No response... closed

NagayamaToshiaki commented 8 months ago

I can't send the mail file because it is confidencial (inner company mail data).