diff options
author | Raúl Benencia <rul@kalgan.cc> | 2013-07-28 16:47:24 -0300 |
---|---|---|
committer | Raúl Benencia <rul@kalgan.cc> | 2013-07-28 16:47:24 -0300 |
commit | d46d09b7b874e4d9af9fe54b06bbe42d713f916b (patch) | |
tree | c2981753c05865a721259ce21aeaff70cef70e5d | |
parent | e6217fe535e298f8f8e17c9642f088277b90c8ba (diff) |
support for ISO-8859-2
-rw-r--r-- | Rfc1342.hs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |