Hello,
-
Is there a way to print unicode characters like "é " or “€” with Inky pHat ?
Ex:#!/usr/bin/env python
#coding: utf8init code …
text = 'éric a 3€’
inkyphat.text((2, 28), text, inkyphat.BLACK, font)
Thanks
Hello,
Is there a way to print unicode characters like "é " or “€” with Inky pHat ?
Ex:
#!/usr/bin/env python
#coding: utf8
text = 'éric a 3€’
inkyphat.text((2, 28), text, inkyphat.BLACK, font)
Thanks
I will reply myself : use unicode strings :
In python 2.x :
u’éric a 3€’
In python 3.x unicode strings should be automatic.
Good find! Thanks for sharing it with us. :)
I should have whipped up a demo with an example of this- since it’s using real fonts and not limited, custom, pixel-based ones the character coverage is much more comprehensive than most of our display products which are often limited to ASCII (sometimes limited by hardware; IE: dot3k).