Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^4: MIME::Parser parse_data

by boosth (Initiate)
on Jan 17, 2013 at 18:57 UTC ( #1013857=note: print w/replies, xml ) Need Help??

in reply to Re^3: MIME::Parser parse_data
in thread MIME::Parser parse_data

The problem is that I have other emails where it has the same format but I have to use this instead:
$MessageBody = " ". decode('UTF-8',decode_base64($tmp_part->bodyh +andle->as_string));
------_=NextPart002_01CDF2E2.B6A090C6 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgU3VlICwKCldpbGwgYmUgaW4gdG91Y2ggaSBhbSB0aGlua2luZyBvZiBkb2luZyBhIH +RyaXAg dG8gSXRhbH

Replies are listed 'Best First'.
Re^5: MIME::Parser parse_data
by Corion (Pope) on Jan 17, 2013 at 19:08 UTC

    Then I would guess that you have an encoding problem in the larger sense.

    Somewhere along the long chain from mail sender via your program to the output of your program, things are getting decoded in the wrong way.

    I know of no other way than to check at every conversion step that you decode the byte sequence from the right encoding.

    As both Content-Type header lines are equal, you should handle them in an equal fashion. This could mean that the sending mail program already encodes the mail in a wrong way. That would be out of your influence.

    I still recommend checking the remaining parts of your program as to whether you mix up different string encodings when converting or printing output.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1013857]
[1nickt]: marto would like to hear that. Of course he speaks very deliberately and dramatically, allowing pauses between words, so if anybody could pull it off it would be him, or someone impersonating him ...
[Eily]: Discipulus that's a chess joke BTW right? Because bishops don't walk straight :D
[choroba]: stop making chessy jokes about bishops!
[choroba]: I mean cheesy
[LanX]: lol
[ambrus]: no, the chess bishop itself is a joke on real bi-shops
[ambrus]: or at least on the stereotype of bi-shops
[choroba]: we call chess bishops "archers"
[Eily]: choroba sorry, I had to get that off my chess
[ambrus]: chess certainly hasn't started those stereotypes, like how kings aren't that powerful but has convinced their whole country to work for them, etc. it's just poured them to a nice clean form that would easily get propagated.

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (14)
As of 2017-09-26 12:13 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (294 votes). Check out past polls.