From d46d09b7b874e4d9af9fe54b06bbe42d713f916b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Sun, 28 Jul 2013 16:47:24 -0300 Subject: support for ISO-8859-2 --- Rfc1342.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Rfc1342.hs') 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 . -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 -- cgit v1.2.3