base64 decode - problem with special characters

P

Patrick

Hi...

I have a problem with Mime/base64 decoding. Maybe someone can help. I have
an original Text, that I send using outlook. The text is: "This is a
testmail ä ü ö é à è" (without the ")

So on the mailserver I open the message and the body is base64 encoded and
contains
VGhpcyBpcyBhIHRlc3RtYWlsIOQg/CD2IOkg4CDoDQo=

When I now decrypt that with base64 (I use a class in .NET), then I get:
"This is a testmail d | v i ` h" (without the ")

I can't find out, what happened with the special characters like ä/ü ... are
they still encoded in mime? Has someone an algorithm for solving that
problem.

Thanks
Patrick
 
J

Jon Skeet

Patrick said:
I have a problem with Mime/base64 decoding. Maybe someone can help. I have
an original Text, that I send using outlook. The text is: "This is a
testmail ä ü ö é à è" (without the ")

So on the mailserver I open the message and the body is base64 encoded and
contains
VGhpcyBpcyBhIHRlc3RtYWlsIOQg/CD2IOkg4CDoDQo=

When I now decrypt that with base64 (I use a class in .NET), then I get:
"This is a testmail d | v i ` h" (without the ")

I can't find out, what happened with the special characters like ä/ü ... are
they still encoded in mime? Has someone an algorithm for solving that
problem.

I suspect the problem is probably that you're not specifying the
character encoding - how did you convert the text to bytes before you
Base64-encoded it?
 
P

Patrick

I suspect the problem is probably that you're not specifying the
character encoding - how did you convert the text to bytes before you
Base64-encoded it?

the problem is, that the encoding is done by the email-client, in my case by
outlook, so i don't know which is the exact encoding... any ideas?
 
J

Jon Skeet

Patrick said:
the problem is, that the encoding is done by the email-client, in my case by
outlook, so i don't know which is the exact encoding... any ideas?

There should be a content-type header somewhere. What does the whole
message look like?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top