Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data ShiftJis
- encodeViaTextICU :: String -> Text -> IO ByteString
- encodeViaTextICU' :: String -> Text -> ByteString
- decodeViaTextICU :: String -> ByteString -> IO (Either String Text)
- decodeViaTextICU' :: String -> ByteString -> Either String Text
Documentation
encodeViaTextICU :: String -> Text -> IO ByteString Source #
Encode some Text
to the given character set using text-icu.
No guarantees about correctness. Encodings are weird. e.g. Shift JIS's yen/backslash problem is apparently to do with OSs treating it differently.
Expects a Text
that is confirmed valid for converting to the character set.
The charset must be valid, or it's exception time. See text-icu.
encodeViaTextICU' :: String -> Text -> ByteString Source #
decodeViaTextICU :: String -> ByteString -> IO (Either String Text) Source #
decodeViaTextICU' :: String -> ByteString -> Either String Text Source #