попалось такое письмецо: PHP: $body = "heardfroma, =D0=91=D0=BB=D0=B0=D0=B3=D0=BE=D0=B4=D0=B0=D1=80=D0=B8=D0=BC =D0=92=D0=B0= =D1=81 =D0=B7=D0=B0 =D1=80=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80=D0=B0=D1=86= =D0=B8=D1=8E =D0=BD=D0=B0 =D1=81=D0=B0=D0=B9=D1=82=D0=B5 =20 =D0=9F=D0=BE=D0=BF=D1=83=D0=BB=D1=8F=D1=80=D0=B5=D0=BD.RU - =D1=81=D0=BE=D0= =BE=D0=B1=D1=89=D0=B5=D1=81=D1=82=D0=B2=D0=BE =D1=82=D0=B0=D0=BB=D0=B0=D0= =BD=D1=82=D0=BB=D0=B8=D0=B2=D1=8B=D1=85 =D0=B8 =20 =D1=82=D0=B2=D0=BE=D1=80=D1=87=D0=B5=D1=81=D0=BA=D0=B8=D1=85 =D0=BB=D1=8E= =D0=B4=D0=B5=D0=B9. =D0=92=D1=8B =D0=BC=D0=BE=D0=B6=D0=B5=D1=82=D0=B5 =D1= =81=D0=B5=D0=B9=D1=87=D0=B0=D1=81 =D0=B2=D0=BE=D0=B9=D1=82=D0=B8 =20 =D0=BD=D0=B0 http://populyaren.ru/user =D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C= =D0=B7=D1=83=D1=8F =D1=81=D0=BB=D0=B5=D0=B4=D1=83=D1=8E=D1=89=D0=B8=D0=B5= =20 =D1=83=D1=87=D0=B5=D1=82=D0=BD=D1=8B=D0=B5 =D0=B4=D0=B0=D0=BD=D0=BD=D1=8B= =D0=B5: =D0=B8=D0=BC=D1=8F =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82= =D0=B5=D0=BB=D1=8F: heardfroma =D0=BF=D0=B0=D1=80=D0=BE=D0=BB=D1=8C: 9gc4d09 =D0=92=D1=8B =D1=82=D0=B0=D0=BA =D0=B6=D0=B5 =D0=BC=D0=BE=D0=B6=D0=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80=D0=B0=D0=BD=D0=B8=D1=86=D1=83 =20 http://populyaren.ru/user/6/edit, =D0=B3=D0=B4=D0=B5 =D0=BC=D0=BE=D0=B6=D0= =B5=D1=82=D0=B5 =D1=81=D0=BC=D0=B5=D0=BD=D0=B8=D1=82=D1=8C =D1=81=D0=B2=D0= =BE=D0=B9 =20 =D0=BF=D0=B0=D1=80=D0=BE=D0=BB=D1=8C. =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC =D0=BA =D0=92= =D0=B0=D0=BC heardfroma, =D0=90=D0=B4=D0=BC=D0=B8=D0=BD=D0=B8=D1=81=D1=82= =D1=80=D0=B0=D1=82=D0=BE=D1=80 =20 =D0=9F=D0=BE=D0=BF=D1=83=D0=BB=D1=8F=D1=80=D0=B5=D0=BD.=D0=A0=D1=83"; решил таким извратом: PHP: $var = explode('<br />', nl2br($body)); $new = array(); foreach($var as $line) $new[] = (substr($line, -1) == '=')? substr(trim($line), 0, -1) : trim($line); $body = mb_convert_encoding(urldecode(str_replace('=', '%', implode('', $new))), 'utf-8', 'auto'); а есть способ попроще?
а зачем удалять _ ? и тогда наверное так будет правильнее: PHP: print urldecode(str_replace(Array("=" . PHP_EOL,'=','_'),Array('','%',' '),$body));
тогда все еще проще PHP: quoted_printable_decode() Если не ошибаюсь, среди функций imap_* есть похожая, не помню точно, как называется