Send binary to email

Discussion in 'ASP General' started by Slim, Dec 25, 2005.

  1. Slim

    Slim Guest

    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
    Slim, Dec 25, 2005
    #1
    1. Advertising

  2. 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!

    "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, Dec 28, 2005
    #2
    1. Advertising

  3. Slim

    Slim Guest

    "Jerry Kizziar" <> wrote in message
    news:...
    > 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




    > 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!
    >
    > "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
    >>
    >>
    >>
    >>
    >>
    >>
    Slim, Jan 5, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Peter
    Replies:
    0
    Views:
    3,357
    Peter
    Jul 1, 2003
  2. Replies:
    2
    Views:
    397
    Tintin
    Jan 5, 2007
  3. Replies:
    13
    Views:
    466
    Randy Webb
    May 14, 2006
  4. pbd22
    Replies:
    1
    Views:
    148
  5. ashish makani
    Replies:
    5
    Views:
    576
    Mark Lawrence
    Sep 20, 2012
Loading...

Share This Page