diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-04 12:15:23 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2015-12-04 12:15:23 +0100 |
commit | 36a208f44df4b3c1480e4b873efca75f6adae3b4 (patch) | |
tree | 849e4d1c755f1e476a315b3ddc839818bbd7ce28 /libraries/base | |
parent | d40f5b78708273255b3d433ed6a225f674c7238e (diff) | |
download | haskell-36a208f44df4b3c1480e4b873efca75f6adae3b4.tar.gz |
Use builtin ISO 8859-1 decoder in mkTextEncoding
We already do this for UTF8/16/32, so it seems obvious do the same
for the closely related popular ISO 8859-1 encoding, and avoid iconv
issues on some platforms (such as AIX which which bundles a broken
`libiconv` by default)
This fixes #11096
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/GHC/IO/Encoding.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libraries/base/GHC/IO/Encoding.hs b/libraries/base/GHC/IO/Encoding.hs index a690717ebd..18b5432d03 100644 --- a/libraries/base/GHC/IO/Encoding.hs +++ b/libraries/base/GHC/IO/Encoding.hs @@ -245,6 +245,8 @@ mkTextEncoding' cfm enc = "UTF32" -> return $ UTF32.mkUTF32 cfm "UTF32LE" -> return $ UTF32.mkUTF32le cfm "UTF32BE" -> return $ UTF32.mkUTF32be cfm + -- ISO8859-1 we can handle ourselves as well + "ISO88591" -> return $ Latin1.mkLatin1 cfm #if defined(mingw32_HOST_OS) 'C':'P':n | [(cp,"")] <- reads n -> return $ CodePage.mkCodePageEncoding cfm cp _ -> unknownEncodingErr (enc ++ codingFailureModeSuffix cfm) |