代码: https://github.com/lvgl/lvgl/blob/master/src/lv_core/lv_obj.c
/*Test if the IDE has UTF-8 encoding*/
char * txt = "Á";
uint8_t * txt_u8 = (uint8_t *) txt;
if(txt_u8[0] != 0xc3 || txt_u8[1] != 0x81 || txt_u8[2] != 0x00) {
LV_LOG_WARN("The strings has no UTF-8 encoding. Some characters won't be displayed.")
}
离线