Parsing 8bit email

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Parsing 8bit email

Johan Solve
Lasso 8.6

Has anyone a good recipe for receiving and parsing email that is sent
with Content-Transfer-Encoding: 8bit and an old-skool charset such as
Windows-1252 oct ISO-8859-1? I can't figure the encoding out.

email_pop->retrieve returns string. I think it would have helped if it
returned bytes.

So I need to convert this string with a raw email message with mangled
encoding into a proper utf-8 string. I've tried all variants of import
string, export string, bytes(..., charset) that I can think of.


--
Mvh
Johan Sölve
____________________________________
Montania System AB
Halmstad   Stockholm
http://www.montania.se

Johan Sölve
Mobil +46 709-51 55 70
[hidden email]

Kristinebergsvägen 17, S-302 41 Halmstad, Sweden
Telefon +46 35-136800 |  Fax +46 35-136801

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Parsing 8bit email

Bil Corry-3
Have you looked at the email source?  Maybe you can tweak it to return
bytes?


- Bil

On Wed, Apr 15, 2015 at 10:39 AM, Johan Solve <[hidden email]> wrote:

> Lasso 8.6
>
> Has anyone a good recipe for receiving and parsing email that is sent
> with Content-Transfer-Encoding: 8bit and an old-skool charset such as
> Windows-1252 oct ISO-8859-1? I can't figure the encoding out.
>
> email_pop->retrieve returns string. I think it would have helped if it
> returned bytes.
>
> So I need to convert this string with a raw email message with mangled
> encoding into a proper utf-8 string. I've tried all variants of import
> string, export string, bytes(..., charset) that I can think of.
>
>
> --
> Mvh
> Johan Sölve
> ____________________________________
> Montania System AB
> Halmstad   Stockholm
> http://www.montania.se
>
> Johan Sölve
> Mobil +46 709-51 55 70
> [hidden email]
>
> Kristinebergsvägen 17, S-302 41 Halmstad, Sweden
> Telefon +46 35-136800 |  Fax +46 35-136801
>
> #############################################################
>
> This message is sent to you because you are subscribed to
>   the mailing list Lasso [hidden email]
> Official list archives available at http://www.lassotalk.com
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>

#############################################################

This message is sent to you because you are subscribed to
  the mailing list Lasso [hidden email]
Official list archives available at http://www.lassotalk.com
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>