Библиотека поддержки кириллицы для дисплеев на базе контроллера HD44780 без встроенной кириллицы. Подключение дисплея как напрямую (10-контактное), так и по интерфейсу I2C.
The check for numbers less than 128 is valid when we are dealing with single-byte values. However, a variable of type wchar_t is two bytes long, so Cyrillic characters will start somewhere from the number 1000 and above. Therefore, all values from 0 to 255 represent Latin characters, while starting from 265, they are already two-byte utf8 characters. If you accidentally truncate a string with Arduino's built-in libraries, a number higher than 128 may end up in the check, leading to a microcontroller reboot. Here's a minimal example:
The check for numbers less than 128 is valid when we are dealing with single-byte values. However, a variable of type wchar_t is two bytes long, so Cyrillic characters will start somewhere from the number 1000 and above. Therefore, all values from 0 to 255 represent Latin characters, while starting from 265, they are already two-byte utf8 characters. If you accidentally truncate a string with Arduino's built-in libraries, a number higher than 128 may end up in the check, leading to a microcontroller reboot. Here's a minimal example:
This fix allows truncated characters to be displayed properly without causing errors.