HTMLviewer '=' problem

  1. 2 weeks ago

    Ian C

    May 19 Bideford,Devon England....

    Hi,
    Have just use a HTMLviewer to show HTML from an email by using this code

    Var f As FolderItem
    HTMLViewer1.LoadPage(email.bodyhtml, f)

    Have missed some of code which just retrieves the email

    The problem is that it shows the text correctly but it shows the '=' sign in the code were I think it should be a line return, is there anyway I can stop this.

    Sorry if I have missed something obvious.

    Ian

    That's quoted printable encoding (https://en.wikipedia.org/wiki/Quoted-printable ). The text can be decoded with https://docs.xojo.com/DecodeQuotedPrintable .

  2. Beatrix W

    May 20 Testers, Third Party Store Answer Europe (Germany)

    That's quoted printable encoding (https://en.wikipedia.org/wiki/Quoted-printable ). The text can be decoded with https://docs.xojo.com/DecodeQuotedPrintable .

  3. Tim S

    May 20 Testers Canterbury, UK

    @Beatrix W That's quoted printable encoding (https://en.wikipedia.org/wiki/Quoted-printable ). The text can be decoded with https://docs.xojo.com/DecodeQuotedPrintable .

    The EmailMessage class doc doesn't mention whether the HTML body of the email that you receive has been properly decoded or not by the time it's available to be used. Sounds like it just pays attention to the Content-Type: header which should be "text/html" for an HTML body, but not the Content-Transfer-Encoding: header which may specify plain text, or, as in the OP's case, quoted-printable. Or it might be Base64 encoded, too.

  4. Ian C

    May 20 Bideford,Devon England....
    Edited 2 weeks ago

    Thanks for the info but not sure how to apply that to a HTMLviewer box.

    This might help..

    If I put the HTML into a Textfield then this is what appears.

    <!doctype html>
    <html>
    <head>
    <title>Thank you for your order!</title>
    </head>
    .....
    ......
    only showing part.

    And this is what appears in HTMLviewer

    Thank= you for your order!
    am not sure how to access the text in a HTMLviewer box as would filter it.

    Any idea's....

    Sorry forgot to say am running windows 10 Pro...

  5. Tim S

    May 20 Testers Canterbury, UK

    Before doing the LoadPage you need to decode the bodyhtml as Beatrix suggests. It's the output of that which you send to the HTMLViewer with LoadPage.

  6. Ian C

    May 20 Bideford,Devon England....

    Thank you for your help did as Beatrix suggested.

    s = decodeQuotedPrintable(email.bodyhtml)

    HTMLViewer1.LoadPage(s, f)

    It not works fine.

    Now I just need to get the text from the HTMLviewer.

    Thank You again.

    Ian

or Sign Up to reply!