Copyright | (c) 2017 Christopher Lord |
---|---|
License | BSD-style |
Maintainer | christopher@pliosoft.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Safe |
Language | Haskell2010 |
Simple conversion of Unicode Text to and from code page 437.
Unrepresentable unicode characters are converted to a null byte.
Synopsis
- textToCp437 :: Text -> ByteString
- cp437ToText :: ByteString -> Text
- utfToByte :: Char -> Word8
- byteToUtf :: Word8 -> Char
Text/ByteString
textToCp437 :: Text -> ByteString Source #
Given a string of text, produce a bytestring containing valid CP-437 encoded data. If any UTF symbols are used that occur in CP437 they will be translated.
cp437ToText :: ByteString -> Text Source #
Given a ByteString that is encoded with CP-437, will decode to a UTF Text, with all symbols converted.