darcs-2.18.3: a distributed, interactive, smart revision control system
Safe HaskellSafe-Inferred
LanguageHaskell2010

Darcs.Util.Encoding

Synopsis

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.