forked from extern/egroupware
* Mail/API: some servers do report capabilities that they do not fully support; thus relying on those results in failure; use hordes capability_ignore to avoid the problems; map charset ks_c_5601-1987 to CP949 as the former is not supported by php(s) conversion functions and should be mapped to the latter
This commit is contained in:
parent
f01bb8ee15
commit
493488b1b1
@ -189,6 +189,22 @@ class emailadmin_imap extends Horde_Imap_Client_Socket implements defaultimap
|
||||
)),
|
||||
);
|
||||
}
|
||||
// switch to allow to disable some capabilites known to be troublesome
|
||||
switch (strtolower(trim($this->params['acc_imap_host'])))
|
||||
{
|
||||
case 'imap.yandex.com':
|
||||
// imap.yandex.com - reports BINARY (server side decoding) but does not decode but
|
||||
// returns undecoded bodyParts AND reports an encoding for the returned part.
|
||||
// expected behavior would be: if server side decoding succeeds , horde should
|
||||
// either report 7bit or 8bit when calling getBodyPartDecode. if it fails or BINARY
|
||||
// is not supported NULL is expected on getBodyPartDecode
|
||||
// yandex.com does not succeed in decoding but getBodyPartDecode is reported as 7bit/8bit
|
||||
// as we have no way to tell this apart we ignore BINARY this affects
|
||||
// Horde_Imap_Client_Fetch_Query::bodyPart for its fetch parameter decode=true is ignored
|
||||
// (other functionality depending on BINARY is, of cause, affected too)
|
||||
$parent_params['capability_ignore']= array_merge((array)$parent_params['capability_ignore'],array('BINARY'));
|
||||
break;
|
||||
}
|
||||
parent::__construct($parent_params);
|
||||
}
|
||||
|
||||
|
@ -825,6 +825,9 @@ class translation
|
||||
*/
|
||||
switch($from)
|
||||
{
|
||||
case 'ks_c_5601-1987':
|
||||
$from = 'CP949';
|
||||
break;
|
||||
case 'gb2312':
|
||||
case 'gb18030':
|
||||
$from = 'EUC-CN';
|
||||
|
Loading…
Reference in New Issue
Block a user