473,851 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
+ 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
VGhpcyBpcyBhIHR lc3RtYWlsIOQg/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 7686
Patrick <pa********@blu email.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
VGhpcyBpcyBhIHR lc3RtYWlsIOQg/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.co m>
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********@blu email.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.co m>
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
4228
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 wrong. I think i am doing something basically wrong. pls help. Output is not the same as seen here because of special characters Output from C: is only 12 bytes long
0
2418
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 characters and also the BASE64 Character set ( like this "<searchKeyword>&#xc3;&#xa7;&#xc3;&#xa3;&#xc3;&#xb1;</searchKeyword>"). Since I am passing the entire string to this function and I want this function to handle only the BASE64 Characters and...
4
5373
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 a decoded String. Any help is very much appreciated. Thanks Philip.
5
7573
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 as I know base64 data is not any known graphic format, from what I understand it's just encoded stream of bytes. Which I need to write to .dat file. Where to start? any links or suggestions? Thank you.
3
4103
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 what I did wrong here? Thanks.
3
971
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 on the mailserver I open the message and the body is base64 encoded and contains VGhpcyBpcyBhIHRlc3RtYWlsIOQg/CD2IOkg4CDoDQo=
14
4364
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 convert it to text. i've tried the usual binary/ascii techniques, but they just seem to loop back in to each other. what is the step by step to get from base64 to text? this is for an evil riddle i'm trying to solve. thanks. Becca. here's the...
8
2815
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 the result should be "pass____ what the result is where each underline char is a nothing char. I am about to write a function that will remove the nothing chars butI would like to know what is causing the problem and simply avoid it
13
14804
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 send me the library file which helps that is really grateful. aruna.
0
9895
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11011
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10725
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9503
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7900
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5931
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4547
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 we have to send another system
2
4142
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3178
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.