summaryrefslogtreecommitdiff
path: root/Rfc1342.hs
diff options
context:
space:
mode:
authorRaúl Benencia <rul@kalgan.cc>2013-07-28 16:47:24 -0300
committerRaúl Benencia <rul@kalgan.cc>2013-07-28 16:47:24 -0300
commitd46d09b7b874e4d9af9fe54b06bbe42d713f916b (patch)
treec2981753c05865a721259ce21aeaff70cef70e5d /Rfc1342.hs
parente6217fe535e298f8f8e17c9642f088277b90c8ba (diff)
support for ISO-8859-2
Diffstat (limited to 'Rfc1342.hs')
-rw-r--r--Rfc1342.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Rfc1342.hs b/Rfc1342.hs
index 2e988b9..5de85d1 100644
--- a/Rfc1342.hs
+++ b/Rfc1342.hs
@@ -14,9 +14,9 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
-module Rfc1342 (decodeField) where
-- This module is an ugly hack. It has been poorly tested and it'll
-- probably blow up in your face. You've been warned.
+module Rfc1342 (decodeField) where
import qualified Codec.Binary.Base64 as B64
import qualified Codec.Binary.QuotedPrintable as QP
@@ -30,6 +30,7 @@ import Data.Encoding(decodeString)
-- Encoding imports. If you want to support more encodings, just add'em here.
import Data.Encoding.UTF8
import Data.Encoding.ISO88591
+import Data.Encoding.ISO88592
import Data.Encoding.ISO88598
import Data.Encoding.ISO88599
@@ -39,6 +40,7 @@ decodeField ('=':'?':cs) = decodeWithCharset dec rest
dec = case (map toLower encoding) of
"utf-8" -> decodeString UTF8
"iso-8859-1" -> decodeString ISO88591
+ "iso-8859-2" -> decodeString ISO88592
"iso-8859-8" -> decodeString ISO88598
"iso-8859-9" -> decodeString ISO88599
_ -> id
nihil fit ex nihilo