![]() ![]() ![]() Nw0KPg0KPiBDbG91ZHdvcmtlcnMgQWdlbnRzIEhLIDxqb2JzLmhrQGNsb3Vkd29ya2Vycy5jb21w IuihqOagvOS6pOWbnu+8jOS9huaIkeacieWAi+WVj+mhjOaYr+iWqumFrOWmguS9leioiOeul++8 JDIxOjI4IOWvq+mBk++8mg0KDQo+IOS9oOWlve+8jOaIkeacg+eboeW/q+Whq+WlveS4puS4lOaK I feel it is not the correct way to solve my task to fetch mail and save as utf-8 in database.Ĭontent-Type: text/plain charset="UTF-8"ĥL2g5aW977yM5pyJ5pu05aSa6Zec5pa86Jaq6YWs6LOH5paZ5ZeO77yfDQoNCuOAjEhPIE1hcmt1ĬyA8bWFya3VzaG8xMDMwQGdtYWlsLmNvbT7jgI3lnKggMjAyMOW5tDnmnIgz5pelIOmAseWbm++8 My current workaround is extending IncomingMail and make getter for DataPartInfo IncomingMail::dataInfo to extract charset and apply conversion after text fetched. So, data is still koi8-r.īut I need to convert it to utf-8, the problem is I can't access to $charset values appear in DataPartInfo::convertEncodingAfterFetch(), so don't know what to pass to mb_convert_encoding($text, 'UTF-8', $charset) as 3rd arg. The chain of calls to fetch textPlain is: IncomingMail::_get('textPlain'), then recursively DataPartInfo::fetch() and at the end is DataPartInfo::convertEncodingAfterFetch() there proper charset exists ( koi8-r, in my case), but after data passed to Mailbox::decodeMimeStr() it is not encoded to UTF, since $charset is default. I'm fetching multiple e-mails from a mailbox, some of them are UTF encoded, others are koi-8r. In my case, I don't know the charset to set Mailbox::decodeMimeStrDefaultCharset.
0 Comments
Leave a Reply. |