| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Darcs.Util.Encoding
Synopsis
- encode :: String -> IO ByteString
- decode :: ByteString -> IO String
- encodeUtf8 :: String -> IO ByteString
- decodeUtf8 :: ByteString -> IO String
Documentation
encode :: String -> IO ByteString Source #
Encode a String into a ByteString according to the user's locale
with the ghc specific //ROUNDTRIP feature added. This means the argument
is allowed to contain non-Unicode Chars as produced by decode.
decode :: ByteString -> IO String Source #
Decode a ByteString into a String according to the user's locale
with the ghc specific //ROUNDTRIP feature added. This means the result
may contain Chars that are not valid Unicode in case decoding with the
user's locale fails.
encodeUtf8 :: String -> IO ByteString Source #
decodeUtf8 :: ByteString -> IO String Source #