FoxInCloud
html2txt
Gravatar is a globally recognized avatar based on your email address. html2txt
  Vincent H.
  All
  Sep 22, 2022 @ 09:40am

I am trying to display the content of an email, from the .eml

There are converters to PDF, but online.

So I'm going to tinker something in VFP.

Do you have a program to convert HTML to TXT (ex: J'ai pris connaissance de votre plateforme=C2=A0et je s=ouhaite vous faire d=C3=A9couvrir notre site)?

Thanks in advance

Gravatar is a globally recognized avatar based on your email address. re: html2txt
  FoxInCloud Support - Thierry N.
  Vincent H.
  Sep 23, 2022 @ 10:06am

You need to find the original encoding in the message headers; then process the text similar to wwUtils::URLdecode() with % replaced by =; then convert from the original encoding (eg. UTF-8) to VFP/Windows.

Gravatar is a globally recognized avatar based on your email address. re: html2txt
  Vincent H.
  FoxInCloud Support - Thierry N.
  Sep 23, 2022 @ 10:24am

Yes, thanks Thierry

Gravatar is a globally recognized avatar based on your email address. re: html2txt
  FoxInCloud Support - Thierry N.
  Vincent H.
  Sep 23, 2022 @ 10:06pm

Maybe URLdecode(chrTran(msg, '=', '%'))

Gravatar is a globally recognized avatar based on your email address. re: html2txt
  Vincent H.
  FoxInCloud Support - Thierry N.
  Sep 24, 2022 @ 12:53am

Thanks, but not quite. I implemented this small conversion which seems to do the job

      Mcontent = STRTRAN (STRTRAN (STRTRAN (STRTRAN (STRTRAN (STRTRAN (STRTRAN (STRTRAN (STRTRAN (STRTRAN (STRTRAN (STRTRAN (m.Mcontent, "=C3=A0", "à"), "=C3=A2", "â"), "=C3=A9", "é"), "=C3=A8", "è"), "=C3=AA", "ê"), "=C3=B4", "ô"), "=C3=B4", "ù"), "=C3=BB", "û"),;
      "=C3=A7", "ç"), "=E2=80=99", Apostro), "=C2=A0", Espace), Egale + RetChar, Vierge)
Gravatar is a globally recognized avatar based on your email address. re: html2txt
  FoxInCloud Support - Thierry N.
  Vincent H.
  Sep 24, 2022 @ 04:12am

Risky… will break with a new combination

what about URLdecode(chrTran(msg, '=', '%'), .T.)?

Gravatar is a globally recognized avatar based on your email address. re: html2txt
  Vincent H.
  FoxInCloud Support - Thierry N.
  Sep 24, 2022 @ 05:02am

Original text:

J'ai pris connaissance de votre plateforme et je souhaite vous faire d=C3=A9couvrir notre site du Village de la justice https://www.village-justice.com/articles/. Il est le 1er m=C3=A9dia en ligne pour les m=C3=A9tiers du Droit et le 3e s= ite BtoB fran=C3=A7ais avec un bel =C3=A9cosyst=C3=A8me de partage. On comptabilise en moyenne 2,2 millions de visites par mois et sur nos r=C3=A9seaux sociaux : LinkedIn : 73k / Facebook : 18k / Twitter : 35.7k Je vous joins notre kit m=C3=A9dia et je serai ravie d'=C3=A9changer avec v= ous =C3=A0 ce sujet, ainsi qu'en savoir plus sur vos services. Belle fin de journ=C3=A9e =C3=A0 vous,

strconv (URLdecode(chrTran(_cliptext, '=', '%')), 11):

J'ai pris connaissance de votre plateforme et je souhaite vous faire découvrir notre site du Village de la justice https://www.village-justice.com/articles/. Il est le 1er média en ligne pour les métiers du Droit et le 3e s?te BtoB français avec un bel écosystème de partage. On comptabilise en moyenne 2,2 millions de visites par mois et sur nos réseaux sociaux : LinkedIn : 73k / Facebook : 18k / Twitter : 35.7k Je vous joins notre kit média et je serai ravie d'échanger avec v?us à ce sujet, ainsi qu'en savoir plus sur vos services. Belle fin de journée à vous,

Gravatar is a globally recognized avatar based on your email address. re: html2txt
  FoxInCloud Support - Thierry N.
  Vincent H.
  Sep 24, 2022 @ 05:35am

URLdecode(chrTran(strTran(msg, '= ', ''), '=', '%'), .t.)

© 1996-2024