From 5116153eb6ea1dd9cae8f7aea4597207a35d1516 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Sat, 18 Apr 2020 13:55:58 +1200 Subject: [PATCH] Silence encoding errors, as it's a nuisance for encoding sniffing. TODO: This didn't make it into the previous release. --- src/Network/URI/Charset.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Network/URI/Charset.hs b/src/Network/URI/Charset.hs index 1f914ee..ac1df5d 100644 --- a/src/Network/URI/Charset.hs +++ b/src/Network/URI/Charset.hs @@ -38,7 +38,7 @@ convertCharset "utf-32" = decodeUtf32LEWith replaceChar convertCharset charset = -- FIXME Is this the best fallback for unsupported charsets? trace ("Unsupported text encoding" ++ charset) $ decodeUtf8With replaceChar -replaceChar error _ = trace error $ Just '�' +replaceChar _ _ = Just '�' -- | Lists all charsets supported by convertCharset charsets :: [Text] -- 2.30.2