Sebastian Becker: Textkodierung Quoted-Printable

Beitrag lesen

Hallo, Tim,

Danke für die Erläuterung - ist ja eigentlich ganz einfach ...

Ich konvertiere die Zeichen jetzt mit folgender Funktion, die ich irgendwo gefunden habe - hoffe, es klappt ...

// quoted printable encoding
function qpEnc($quotprint)
{
$quotprint = str_replace('\r\n',chr(13).chr(10), $quotprint);
$quotprint = str_replace('\n',chr(13).chr(10), $quotprint);
$quotprint = preg_replace("~([\x01-\x1F\x3D\x7F-\xFF])~e", "sprintf('=%02X', ord('\1'))",$quotprint);
$quotprint = str_replace('=0D=0A', '=0D=0A', $quotprint);
return $quotprint;
}

Grüße,

Sebastian