Send binary to email

S

Slim

I have a problem converting binary to text

I am reading a page using xmlhttp

xmlhttp.open "GET", url, false ,"userName","password"
xmlhttp.send ""
tex3 = xmlhttp.responseBody

now I have the binary data of the html page I am reading

I can write this data to the asp page using

Response.BinaryWrite tex3

but I don't want to write it, I want to send it in a email but when I do I
get a load of ??????''??????'?????'
I need to convert it to ASCI
I have tried

tex3 = BinaryToText( tex3)

but did not work

any ideas?

I am using responseBody because responsetext has a problem of converting "'"
to "?"

thanks
 
J

Jerry Kizziar

Ive noticed that you have posted this several times, while I do not have the
answer directly, i will try to point you in hopefully the right direction.

There is an article on MSDN about the responseBody property of XMLHTTP:

http://msdn.microsoft.com/library/d...html/387d9841-f6d4-4e62-883f-bf3819f5b918.asp

in the bottom you will notice that it is a variant of several possible
encoding methods depending on the server, I have had a lot of luck in using
Chilkat Crypt for decoding, http://www.chilkatsoft.com/ they are very
responsive, they usually get back to me within an hour or so, so you might
give that a try. Unfortionatly it is not free. (US $289)

Another note, I have used the XMLHTTP responseText for quite some time now,
and have only run into it translating specific characters to ?, where they
are not the standard character (like the long dash, and wierd single and
double quotes that Microsoft seems to use a lot in Word documents and so on).
So if possible, try making sure that the ' that you are using are the ascii
character 39.

Sorry I couldnt be of more help!
 
S

Slim

Jerry Kizziar said:
Ive noticed that you have posted this several times, while I do not have
the
answer directly, i will try to point you in hopefully the right direction.


thanks mate

I completed the job a different way, but I still would like to know


I am taking a htm page created with MS Word and sending it to email. and yes
i was getting the "?" problem

using responseBody get rid of this so that you can write it to page without
the "?" problem, but you can not pass it to the email componet.

but i solved it buy reading the page directly with
CreateMHTMLBody(thePage)

instad of
..HTMLBody = body
 

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

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,828
Latest member
LauraCastr

Latest Threads

Top