add UTF-8 recode support, Cyrilic rus/ukr tables

Dependents:   Current_load1

Fork of TextLCD by Wim Huiskamp

TextLCD Library UTF-8 recode support, Cyrilic rus/ukr tables

Revision:
45:8625be98ecd4
Parent:
44:fd3889afbe11
--- a/TextLCD.cpp	Tue Oct 13 22:03:16 2015 +0000
+++ b/TextLCD.cpp	Sun Feb 11 20:19:02 2018 +0000
@@ -1541,11 +1541,11 @@
     char utf_low_byte;
 
     if (c>=0x80) { // UTF-8 handling
-        if (c >= 0b11000000) { //(0xc0) First UTF-8 byte
-            utf_hi_char = c&0b00011111;
+        if (c >= 0xC0) { //(0xc0) First UTF-8 byte
+            utf_hi_char = c&0x1F;
             return 0;
-        } else if (c<=0b10111111) { //0xbf Second UTF-8 byte
-            utf_low_byte= c&0b00111111; //Reset 2 hi bit (0x3f)
+        } else if (c<=0xBF) { //0xbf Second UTF-8 byte
+            utf_low_byte= c&0x3F; //Reset 2 hi bit (0x3f)
             utf_code=(utf_hi_char*0x40+utf_low_byte);
 
             //Recode leter not in serial table (from random table)