From f28825e471e206bcb7e6dc8e4874c2b771f7d24c Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 7 Feb 2023 02:30:41 +0100 Subject: move Graphics.* & co. to lib --- lib/Data/Text/Encoding/Extra.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/Data/Text/Encoding/Extra.hs (limited to 'lib/Data') diff --git a/lib/Data/Text/Encoding/Extra.hs b/lib/Data/Text/Encoding/Extra.hs new file mode 100644 index 0000000..a8e6234 --- /dev/null +++ b/lib/Data/Text/Encoding/Extra.hs @@ -0,0 +1,11 @@ +module Data.Text.Encoding.Extra where + +import Data.ByteString (ByteString) +import Data.Text (Text) +import qualified Data.Text.Encoding as Text +import qualified Data.Text.Encoding.Error as Text + + +decodeUtf8Lenient :: ByteString -> Text +decodeUtf8Lenient = + Text.decodeUtf8With Text.lenientDecode -- cgit v1.2.3