473,473 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

base64 decode - problem with special characters

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
3 7635
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
> 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ramy076 | last post by:
I have a C App which uses openssl for Encoding and decoding which needs to be ported to java. The decoded text does not match between the C App and the java App. The size of the output itself is...
0
by: Sridhar Anupindi | last post by:
Hi, I am using the following algorithm to decode the string into ASCII set of characters.. The function returns me the decoded string but the problem is that my string contains both normal...
4
by: John | last post by:
Hi all, I've been going through google and yahoo looking for a certain base64 decoder in C without success. What I'm after is something that you can pass a base64 encoded string into and get back...
5
by: LP | last post by:
A web service returns base64 encoded data. The goal is to parse it and store it into binary file with .dat extension. This file is then will be used by a custom program to produce diagrams. As far...
3
by: Guoqi Zheng | last post by:
Dear sir, I need to decode base64 encoded email. I used below function but it does not work correctly, especially when I need to decode some Characters like Chinese, Can some one point out...
3
by: Patrick | last post by:
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...
14
by: BB | last post by:
Hello. i am trying to decode a block of (what i think is) base64 into text, and i have NO idea how to begin. I'm going to paste the whole string here, but i want to know the steps necessary to...
8
by: Jeremy Kitchen | last post by:
I have encoded a string into Base64 for the purpose of encryption. I then later decrypted it and converted it back from Base64 the final string returns with four nothing characters. "pass" what...
13
by: aruna.eies.eng | last post by:
i am currently trying to convert data into binary data.for that i need to know how to achieve it in c language and what are the libraries that we can use. so if any one can send me a sample code or...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.