text-cp437-0.2.1: Conversion of Text to and from CP437

Copyright(c) 2017 Christopher Lord
LicenseBSD-style
Maintainerchristopher@pliosoft.com
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe
LanguageHaskell2010

Data.Text.CP437

Contents

Description

Simple conversion of Unicode Text to and from code page 437.

Unrepresentable unicode characters are converted to a null byte.

Synopsis

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.

Char/Word8

utfToByte :: Char -> Word8 Source #

Convert a single unicode character to a CP-437 byte.

byteToUtf :: Word8 -> Char Source #

Convert a single byte into a unicode character.