[RCD] GB2312, ISO-2022-KR

Vladimir Gorpenko vgo at stels.ru
Tue Sep 27 18:01:16 CEST 2016

Probably I couldn't explain well.

When I tried to apply a fix to that text which I use (1.1.4), I couldn't 
make it.
Those lines which shall be replaced according to a fix in 1.1.4 had 
significantly other appearance. In particular, there was an additional 
operator if.

But I understood the idea, thanks. If I deal still with this issue, I 
will consider your words.

Best regards,
    Vladimir Gorpenko

A.L.E.C писал 2016-09-27 18:49:
> 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.

More information about the dev mailing list