Home »
Imported messages »
comp.lang.php »
Encoding Problems
Re: Encoding Problems [message #186352 is a reply to message #186349] |
Sat, 05 July 2014 01:28   |
Christoph Michael Bec
Messages: 207 Registered: June 2013
Karma:
|
Senior Member |
|
|
Arno Welzel wrote:
> So extend that for the encoding:
>
> if($msgStructure->subtype=="PLAIN")
> {
> switch($msgStructure->encoding)
> {
> case 4:
> // Body text is quoted-printable encoded
> $body = quoted_printable_decode($body);
> break;
>
> case 3:
> // Body text is base64 encoded
> $body = base64_decode($data);
> break;
> }
>
> $body = renderPlainText($body);
> }
What about a default clause, at least triggering a notice/warning that
the encoding is not understood?
--
Christoph M. Becker
|
|
|
Goto Forum:
Current Time: Tue Apr 15 01:20:13 GMT 2025
Total time taken to generate the page: 0.15041 seconds