On 09/27/2016 05:37 PM, Vladimir Gorpenko wrote:
> // return if encoding found, string matches encoding and
> convert succeeded
> if (in_array($mb_from, $mbstring_list) && in_array($mb_to,
> $mbstring_list)) {
> if (mb_check_encoding($str, $mb_from)) {
> // Do the same as //IGNORE with iconv
> mb_substitute_character('none');
> $out = mb_convert_encoding($str, $mb_to, $mb_from);
> mb_substitute_character($mbstring_sch);
>
> if ($out !== false) {
> return $out;
> }
> }
> }
> I don't decide to adapt your fix to my rcube_charset version.
In general mb_list_encodings() and mb_check_encoding() is not used now.
I did some more test and indeed mb_check_encoding() does not work with
'GBK', but mb_convert_encoding() does (at least with sample text I've
got). So, I assume current git-master code will work for you as well.
--
Aleksander 'A.L.E.C' Machniak
Kolab Groupware Developer [http://kolab.org]
Roundcube Webmail Developer [http://roundcube.net]
----------------------------------------------------
PGP: 19359DC1 # Blog: https://kolabian.wordpress.com
_______________________________________________
Roundcube Development discussion mailing list
[email protected]
http://lists.roundcube.net/mailman/listinfo/dev