Decoding RFC 1342 strings in Haskell

A few hours ago I wrote a quick and dirty snippet for decoding RFC 1342 strings in Haskell. You can find the code in my public git repos.

The module can be used in a very straightforward manner:

Prelude> :load Rfc1342.hs
[1 of 1] Compiling Rfc1342          ( Rfc1342.hs, interpreted )
Ok, modules loaded: Rfc1342.
*Rfc1342> 
*Rfc1342> putStrLn . decodeField $ "=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?="
If you can read this yo
*Rfc1342> putStrLn . decodeField $ "=?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?="
u understand the example.
*Rfc1342> 

Posted on July 28, 2013 by Raúl Benencia
Tags: haskell, snippet

Comments? Sure! Just send me an email with it and I'll happily include it here.