diff options
Diffstat (limited to 'src/Data/Text/Encoding/Extra.hs')
-rw-r--r-- | src/Data/Text/Encoding/Extra.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Data/Text/Encoding/Extra.hs b/src/Data/Text/Encoding/Extra.hs new file mode 100644 index 0000000..a8e6234 --- /dev/null +++ b/src/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 |