Добрый день. Есть функия которая при помощи imap по pop3 вытаскивает письма
function get_body($box = false, $num){
if($num > $this->get_count())
return null;
if(!$box)
$box = $this->box;
$struct = imap_fetchstructure($box,$num);
if(!empty($struct->parts)){
for($i = 0, $j = count($struct->parts); $i < $j; $i++){
$part = $struct->parts[$i];
if($part->subtype == 'PLAIN'){
$body = imap_fetchbody($box,$num, $i+1);
}
}
}
else
$body = imap_body($box,$num);
return $body;
}
как мне перевести тело сообщения к utf8?