By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,870 Members | 2,347 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,870 IT Pros & Developers. It's quick & easy.

base64 decode - problem with special characters

P: n/a
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
Jul 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Patrick <pa********@bluemail.ch> wrote:
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?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Jul 19 '05 #2

P: n/a
> 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?
Jul 19 '05 #3

P: n/a
Patrick <pa********@bluemail.ch> wrote:
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?


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

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet/
If replying to the group, please do not mail me too
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.