|
it
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Send binary to email
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 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/default.asp?url=/library/en-us/xmlsdk/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! Show quote "Slim" wrote: > 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 > > > > > > "Jerry Kizziar" <JerryKizz***@discussions.microsoft.com> wrote in message thanks matenews:E9343AC3-551A-4D0F-B0BF-97F047933D03@microsoft.com... > 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. > 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 Show quote > There is an article on MSDN about the responseBody property of XMLHTTP: > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/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! > > "Slim" wrote: > >> 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 >> >> >> >> >> >> |
|||||||||||||||||||||||