function getPlainTextUTF8() { $txt = $this->toString(true, true, true); $enc = $this->getEncoding(); if ($enc !== false) { $txt = mb_convert_encoding($txt, 'UTF-8', $enc); } return preg_replace('`\\s+`', ' ', html_entity_decode($txt, ENT_QUOTES, 'UTF-8')); }