You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addition. On some operating systems in some cases neither iconv($from, $to.'//IGNORE', $str) nor iconv($from, $to, $str) are able to decode the body. In such cases mb_convert_encoding is able to do it:
Hi @freescout-helpdesk ,
many thanks for your report and great suggestion! I'm a bit afraid though of removing iconv and switching to purely relying on mb_convert_encoding instead. This is mainly caused by a lack of "testability" (Testbarkeit) on my end. Any idea how I could setup a testing environment for this - especially for the test-docker container?
Maybe this info have not reached @Webklex by email, so we are posting it here.
This line https://github.com/Webklex/php-imap/blob/master/src/Message.php#L906 on some systems actually throws
"iconv(): Wrong encoding, conversion from "ISO-8859-1" to "UTF-8//IGNORE" is not allowed"
error. But it's suppressed via "@".On some systems "iconv" works with "//IGNORE" on some without. So here is the solution:
https://github.com/freescout-helpdesk/freescout/blob/master/overrides/webklex/php-imap/src/Message.php#L727
Now we don't have an "empty body" issue anymore in our project.
The text was updated successfully, but these errors were encountered: