473,508 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MIME BASE64

hi,

I'm looking for some code to encode and decode strings in MIME BASE 64 on
vb.net or basic

Is there something that I can use ?

thank you

Feb 25 '06 #1
3 4260
martins <xx*@hotmail.com> wrote:
I'm looking for some code to encode and decode strings in MIME BASE 64 on
vb.net or basic

Is there something that I can use ?


Well, there's Convert.ToBase64String and Convert.FromBase64String. If
there are extra MIME parts you need to understand, that's a separate
matter.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 25 '06 #2
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
martins <xx*@hotmail.com> wrote:
I'm looking for some code to encode and decode strings in MIME BASE 64 on
vb.net or basic

Is there something that I can use ?


Well, there's Convert.ToBase64String and Convert.FromBase64String. If
there are extra MIME parts you need to understand, that's a separate
matter.


thanks

if I have a mime base64 string like this :

dim mimeStr as string = "AAAAAPQBAAAI4ggAXHZpZGVvLnBhc3MALgBwAGEAcwBz"

How can I convert then to a plain string ?

don't know nothing about this

I tried :

Dim PText() As Byte = Convert.FromBase64String(mimeStr)
Dim i As Integer
Dim s As String = ""
For i = 0 To UBound(PText)
s = s + Chr(PText(i))
Next
MsgBox(s)
Feb 25 '06 #3
martins <xx*@hotmail.com> wrote:
if I have a mime base64 string like this :

dim mimeStr as string = "AAAAAPQBAAAI4ggAXHZpZGVvLnBhc3MALgBwAGEAcwBz"

How can I convert then to a plain string ?


Well, Base64 encodes binary data, not text as such. You can use
Convert.FromBase64String to get a byte array, but if that's meant to
represent an encoded text string, you'll need to use something like
Encoding.GetString - but you'll need to know what encoding was used to
encode the string in the first place.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 25 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2802
by: matt roberts | last post by:
Hello, I am parsing a mailbox using the imap functions, pulling out images attached and putting them into mySQL as BLOB fields. I am having problems displaying images once they are stored in...
1
3446
by: Thomas Williams | last post by:
Hello everyone, my name is Tom W. And, I am new to the list, and have been using Python for about a year now. Anyway, I got a question! I am trying to decode MIME (base64) email from a POP3...
1
3726
by: Thomas Williams | last post by:
Thanks, I tried it and it stop at: f = file("mail.txt") with the error message. TypeError: 'str' object is not callable Tom Williams
1
2452
by: Patrick | last post by:
Hi Does someone know how to decrypt mime messages? Is there a class in .net that helps with that? Thanks Patrick
3
2726
by: John Mark Howell | last post by:
I've got a MIME message that was originally an HTML email with embedded images. When the email is received (to GMail) it is now in MIME format. The HTML portion is now split out into the HTML and...
0
2498
by: mubx2000 | last post by:
Hi , I'm looking for code (Symbian C++) that can do the following things: 1-Analyzing the (MIME) types (Content-typemContent-transfere-encoding,Mime Version,Conent Description). 2-Download...
3
10930
by: b. dougherty | last post by:
Greetings all- I am trying to extract subject headers from emails that have been saved as text files. The subject headers are in MIME UTF-8 format, and so they appear like this: subject:...
60
7860
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I prompt a "Save As" dialog for an accepted mime type?...
5
4218
by: smclellan86 | last post by:
Hi Everybody, I've been working on this challenge for a while now without much luck. What I'm attempting to do is split a MIME byte response into its individual images. I am given the boundary to...
0
7225
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,...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7042
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
7495
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
5627
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,...
0
4707
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
3193
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3181
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.