Do you like this post? Writing posts
, developing libraries
and programming online font creators
is actually hard work. I order most of my electronics from a Chinese website called Banggood
. It is save and the items usually arrive in good quality. With every order you do there by following this link
you are supporting the blog. Thank you!
I got a few complaints that the esp8266-oled-ssd1306 library does not handle special characters such as Umlauts properly. It turns out that the Arduino IDE does handle characters in the extended ASCII range (from 128-256) as UTF8 characters which means that Strings containing such characters can take more space than the bare number of symbols in it. For instance the degree character (°) will be represented as two chars with values 0xC2 and 0xB0.
|Extended ASCII now working properly |
Currently the library only supports extended ASCII range and not UTF8. I don’t know if I will ever support UTF8, so I introduced automatic detection and conversion for characters in the extended ASCII table. This should work transparently for the users of the library. The implementation has currently one ugly aspect: if you call the getStringWidth(..) method followed by drawString(..) the conversion will be made twice.
I released the new version 1.0.2 of the library and it should become available in the Arduino IDE library manager shortly for update.
If you want to read more about UTF8 in the Arduino IDE continue here:
Did you like this post? Consider supporting me with a virtual coffee or beer.