dbrgn / RPLCD

A Raspberry Pi LCD library for the widely used Hitachi HD44780 controller, written in Python. GPIO (parallel) and I²C modes supported.
https://rplcd.readthedocs.io/en/latest/
MIT License
262 stars 72 forks source link

how to writh forign language to the lcd ? #105

Closed machine85 closed 5 years ago

machine85 commented 5 years ago

Hello, i am try to writh hebrew to the lcd i try to use:

bstring = 'Temperature: 30°C' bstring 'Temperature: 30°C' bstring.decode('utf-8') u'Temperature: 30°C

but in python 3 i get the error : TypeError: decoding str is not supported

thanks Tom

dbrgn commented 5 years ago

In Python 3, a regular string is already a unicode string. You don't need to do any decoding when writing it to the display, RPLCD always wants unicode strings when writing text to the display.

(Note that I'm not aware of any LCD that supports hebrew characters.)

machine85 commented 5 years ago

Thank you ^(y)