Safe Haskell | None |
---|---|
Language | GHC2021 |
Binrep.Type.Text.Encoding.ShiftJis
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
Instances
Decode ShiftJis Source # | |||||
Encode ShiftJis Source # | |||||
Predicate ShiftJis Source # | |||||
Defined in Binrep.Type.Text.Encoding.ShiftJis Associated Types
| |||||
Refine ShiftJis Text Source # | TODO Unsafely assume all | ||||
Defined in Binrep.Type.Text.Encoding.ShiftJis | |||||
type PredicateName d ShiftJis Source # | |||||
Defined in Binrep.Type.Text.Encoding.ShiftJis |
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 #