Fix for previous commit regarding UTF-8 #1230

This commit is contained in:
the-djmaze 2023-08-21 10:03:36 +02:00
parent 037ed7e257
commit a3bb108b33

View file

@ -391,8 +391,8 @@ trait Messages
$oESearch->aReturn = $aSearchReturn; $oESearch->aReturn = $aSearchReturn;
$oESearch->bUid = $bReturnUid; $oESearch->bUid = $bReturnUid;
$oESearch->sLimit = $sLimit; $oESearch->sLimit = $sLimit;
// if (!$this->UTF8Mode() && !\mb_check_encoding($sSearchCriterias, 'UTF-8')) { // if (!$this->UTF8 && !\mb_check_encoding($sSearchCriterias, 'UTF-8')) {
if (!$this->UTF8Mode() && !\MailSo\Base\Utils::IsAscii($sSearchCriterias)) { if (!$this->UTF8 && !\MailSo\Base\Utils::IsAscii($sSearchCriterias)) {
$oESearch->sCharset = 'UTF-8'; $oESearch->sCharset = 'UTF-8';
} }
$oESearch->SendRequest(); $oESearch->SendRequest();
@ -426,8 +426,8 @@ trait Messages
public function MessageSimpleSearch(string $sSearchCriterias = 'ALL', bool $bReturnUid = true) : array public function MessageSimpleSearch(string $sSearchCriterias = 'ALL', bool $bReturnUid = true) : array
{ {
$aRequest = array(); $aRequest = array();
// if (!$this->UTF8Mode() && !\mb_check_encoding($sSearchCriterias, 'UTF-8')) { // if (!$this->UTF8 && !\mb_check_encoding($sSearchCriterias, 'UTF-8')) {
if (!$this->UTF8Mode() && !\MailSo\Base\Utils::IsAscii($sSearchCriterias)) { if (!$this->UTF8 && !\MailSo\Base\Utils::IsAscii($sSearchCriterias)) {
$aRequest[] = 'CHARSET'; $aRequest[] = 'CHARSET';
$aRequest[] = 'UTF-8'; $aRequest[] = 'UTF-8';
} }