The text-cp437 package

[ Tags: bsd3, library, text ] [ Propose Tags ]

Some devices such as receipt printers require text encoded in CP437. This library can help convert regular UTF symbols to and from this format. See

[Skip to Readme]


Versions, 0.2.1
Dependencies base (>=4.7 && <5), bytestring, text [details]
License BSD3
Copyright (C) 2017 Christopher Lord (Pliosoft), All Rights Reserved
Author Christopher Lord
Category Text
Home page
Bug tracker
Source repository head: git clone
Uploaded Wed Aug 23 17:38:27 UTC 2017 by clord
Distributions NixOS:0.2.1
Downloads 307 total (162 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-08-23 [all 1 reports]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees

Readme for text-cp437-0.2.1

[back to package description]


Basic mapping of cp437 bytes to UTF and back.

textToCp437 :: Text -> ByteString

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

Given a ByteString that is encoded with CP-437, will decode to a UTF Text, with all symbols converted.

utfToByte :: Char -> Word8

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

byteToUtf :: Word8 -> Char

Convert a single byte into a unicode character.