1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

In lv_init test if the the strings are UTF-8 encoded

This commit is contained in:
Gabor Kiss-Vamosi 2020-06-23 11:11:45 +02:00
parent 8c151a2d43
commit db24bf1d18
2 changed files with 9 additions and 0 deletions

View File

@ -23,6 +23,7 @@ Available in the `dev` branch
- Add lv_btnmatrix_set/get_align capability
- DMA2D: Remove dependency on ST CubeMX HAL
- Added `max_used` propriety to `lv_mem_monitor_t` struct
- In `lv_init` test if the the strings are UTF-8 encoded.
### Bugfixes
- None

View File

@ -168,6 +168,14 @@ void lv_init(void)
_lv_img_decoder_init();
lv_img_cache_set_size(LV_IMG_CACHE_DEF_SIZE);
/*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.")
}
lv_initialized = true;
LV_LOG_INFO("lv_init ready");
}