I hope this question isn't too stupid, but I have no idea where to find an answer.
I have a thermal printer (https://shop.pimoroni.com/products/mini-thermal-printer) connected to my pi and it's doing fine.
BUT: how do I print german "Umlaute" like ä, ß, etc. ?
Can I just change the utf-coding?
Thanks for your help!
Code: Select all
#!/usr/bin/env python
# coding: utf-8
import printer, textwrap, sys
p=printer.ThermalPrinter(serialport="/dev/ttyAMA0")
unwrapped_text = sys.stdin.read()
wrapped_text = textwrap.fill(unwrapped_text, 32)
p.print_text(wrapped_text)
p.linefeed()
p.linefeed()
p.linefeed()