A.L.E.C wrote:
if (function_exists('iconv') && ($result = iconv('UTF8', 'UTF8//IGNORE', $input))) return $result;
I've found that some iconv implementations does not support "//IGNORE". Also we can do this with mbstring. Here's a complete patch, please confirm it works (do testing also with commented out mb_convert_encoding's if block).
--- rcube_shared.inc (wersja 3049) +++ rcube_shared.inc (kopia robocza) @@ -599,13 +599,16 @@ return $input; }
mb_convert_encoding($input, 'UTF8', 'UTF8')))
return $res;
if (function_exists('iconv') && ($res = iconv('UTF8', 'UTF8//IGNORE',
$input)))