/** * @return string */ public function ValueWithCharsetAutoDetect() { $sValue = $this->Value(); if (!\MailSo\Base\Utils::IsAscii($sValue) && 0 < \strlen($this->sEncodedValueForReparse) && !\MailSo\Base\Utils::IsAscii($this->sEncodedValueForReparse)) { $sValueCharset = \MailSo\Base\Utils::CharsetDetect($this->sEncodedValueForReparse); if (0 < \strlen($sValueCharset)) { $this->SetParentCharset($sValueCharset); $sValue = $this->Value(); } } return $sValue; }