export encoding error handlers
This commit is contained in:
+23
-4
@@ -23,10 +23,29 @@ LBytestring
|
|||||||
Encoding
|
Encoding
|
||||||
----------
|
----------
|
||||||
|
|
||||||
* encodeUtf8
|
#### encodeUtf8
|
||||||
* decodeUtf8
|
|
||||||
* decodeUtf8'
|
```haskell
|
||||||
* decodeUtf8With
|
encodeUtf8 :: Text -> ByteString
|
||||||
|
```
|
||||||
|
|
||||||
|
#### decodeUtf8
|
||||||
|
|
||||||
|
```haskell
|
||||||
|
decodeUtf8 :: ByteString -> Text
|
||||||
|
```
|
||||||
|
|
||||||
|
#### decodeUtf8'
|
||||||
|
|
||||||
|
```haskell
|
||||||
|
decodeUtf8' :: ByteString -> Text
|
||||||
|
```
|
||||||
|
|
||||||
|
#### decodeUtf8With
|
||||||
|
|
||||||
|
```haskell
|
||||||
|
decodeUtf8With :: Data.Text.Encoding.Error.OnDecodeError -> ByteString -> Text
|
||||||
|
```
|
||||||
|
|
||||||
Conversion
|
Conversion
|
||||||
----------
|
----------
|
||||||
|
|||||||
@@ -349,6 +349,15 @@ import Data.Text.Encoding as X (
|
|||||||
, decodeUtf8With
|
, decodeUtf8With
|
||||||
)
|
)
|
||||||
|
|
||||||
|
import Data.Text.Encoding.Error as X (
|
||||||
|
OnDecodeError
|
||||||
|
, OnError
|
||||||
|
, lenientDecode
|
||||||
|
, strictDecode
|
||||||
|
, ignore
|
||||||
|
, replace
|
||||||
|
)
|
||||||
|
|
||||||
-- IO
|
-- IO
|
||||||
import System.Exit as X
|
import System.Exit as X
|
||||||
import System.Environment as X (getArgs)
|
import System.Environment as X (getArgs)
|
||||||
|
|||||||
Reference in New Issue
Block a user