I have a scrolling LED sign that takes messages in either ASCII or (using some specific code) characters from a custom code page.

For example, the euro sign should be sent as


and ä is


(You can find the full code page in the documentation)

My question is, what is the most pythonic way to implement this custom code page, and to have a codec that can convert UTF strings to my custom code page ?

Was it helpful?


  1. Pick a name for your encoding, maybe "led_display", whatever.
  2. Implement and register a codec with the standard library.
  3. Pythonic profit!
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow