bitrate16/peripage-python

Accentuated characters, Umlauts

kerk1v opened this issue · 2 comments

Hi,

it seems accentuated and special characters are not supported and don't print. Any ideas?

Thanks,

@kerk1v,
As i've found during testing, this printer supports only printing of ASCII bytes without extended codes (0x00-0x7F), because any character beyond this range will print out a █ character. This printer does not accept Unicode or UTF-8/16/32 strings, only ASCII.

If you're trying to print using writeASCII, this function will try to encode input string and send it as-is, this also may cause some errors, that's why it is deprecated.

If you're trying to print using printASCII or printlnASCII, this functions exclude any characters not in range (0x0A, 0x20-0x7E) to avoid unsafe behavior because none of control codes (0x00-0x09, 0x0B-0x1F) can be printed, printer also can not print any character after 0x7E.

Listed functions use internal printer ability to print raw text. However, in future i'm planning to add function for printing any text just by converting it into picture and sending this picture to the printer

Hi, thanks for the clarification.
For now, I am solving the issue by preparing the input with imagemagick convert command.
Thanks for the great work on this library. I use the printer to print a weather forecast and some news to read in the morning, like a newsticker, all controlled by Huginn and Nodered on a Raspberry Pi 4.