This subject consists of three UTF-8 chunks.
This program currently treats each chunk of a header separately, so it is translated as "【要確認】●普通自転車(", "ノーパンクタイヤ) 再予約通�", "� 2023/11/29 12:00 - 13:00". Now, the mojibake occurs between the second and the third chunk.
This bugfix treats chunked header as a sequence, as long as chunks' charsets and encodings are the same (I suppose few mailer change charset and encoding in a row of header though. As RFC2047 does not tell whether the implementers not to do so, I chose the safest way). Thus, the former Subject is treated as:
Descriptions
This branch fixes the bug that encoded words in headers such as subject or sender name that is handled improperly.
For example,
This subject consists of three UTF-8 chunks. This program currently treats each chunk of a header separately, so it is translated as "【要確認】●普通自転車(", "ノーパンクタイヤ) 再予約通�", "� 2023/11/29 12:00 - 13:00". Now, the mojibake occurs between the second and the third chunk.
This bugfix treats chunked header as a sequence, as long as chunks' charsets and encodings are the same (I suppose few mailer change charset and encoding in a row of header though. As RFC2047 does not tell whether the implementers not to do so, I chose the safest way). Thus, the former Subject is treated as:
Now, the subject is safely rendered as "【要確認】●普通自転車(ノーパンクタイヤ) 再予約通知 2023/11/29 12:00 - 13:00".
Related issues
https://github.com/Sicos1977/MSGReader/issues/383
https://github.com/Sicos1977/MSGReader/issues/390