cancel
Showing results for 
Search instead for 
Did you mean: 

Cyrillic symbos, UTF-8 and TouchGFX

EEuge
Senior

Hello, I from Russia and I use cyrillic symbols.

In touchGFX Designer I use cyrillyc symbols without problems.

But if I type cyrillic symbols in IDE, in codefiles

Mytext="Cyrillic_Text";

I get "?????????" on touchGFX gadget.

I try to translate codefiles to UTF-8 - same result: "?????????"

How to solve this problem?

12 REPLIES 12
Karan 123
Senior

Hi,

Did you set Text ->Typography-> WildCard ranges as below for textArea1Buffer ?

0693W000001cO5AQAU.png

Hope this helps..

--

Karan

EEuge
Senior

No.

This is my options. Without any effect

0693W000001cO8sQAE.png

Do you able to see A-Z in Text Area? ​

Yes. I see all symbols, excluding cyrilllyc.

Cyryllic symbols are replaced by "?".

Impotrtant: one cyrillyic symbol replaced by two "?".​

I think ​Cyryllic symbols not understand by TouchGFX.

​Did you check below article

https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/languages-and-characters/

​?

Do have have hex values of your ​cyrillyic symbol?

--

Karan​

Romain DIELEMAN
ST Employee

Have you selected a font supporting Cyrillic? You should found some online (ttf files) and add them in TouchGFX/assets/fonts if you have not found one. (Watchout, if this is for a commercial project make sure you have the license for the font)

EDIT: Verdana actually supports Cyrillic, I did not know. But if you intend to add other languages or if you want to use another font for your text, this is the way to do it if not found in Designer.

If I use cyrillic symbols on textarea in touchgfxdesigner, I have no problem.

If I set value of text string in IDE (keil), I have problem.​

Martin KJELDSEN
Chief III

Check your generated files to see if those unicodes have even been geenrated. For instance, here's generated/fonts/src/Font_Verdana_10_4bpp_0.cpp with the pixel data for a single glyph 0x003F. If touchgfx cannot find your glyphs in the generated files then it will display "?" (if you chose a fallback character).

#include <touchgfx/hal/Types.hpp>
 
FONT_GLYPH_LOCATION_FLASH_PRAGMA
KEEP extern const uint8_t unicodes_verdana_10_4bpp_0[] FONT_GLYPH_LOCATION_FLASH_ATTRIBUTE =
{
    // Unicode: [0x003F, ]
    0xD2, 0xCE, 0x03, 0x21, 0x50, 0x0C, 0x00, 0x30, 0x0C, 0x00, 0xC1, 0x05, 0x00, 0x4D, 0x00, 0x00,
    0x0C, 0x00, 0x00, 0x02, 0x00, 0x00, 0x0F, 0x00
};

DKlyu.1
Associate

I work with Cyrillic as follows

touchgfx::Unicode::UnicodeChar buffer[100]; 
    Unicode::fromUTF8((const uint8_t*)"тек�?т", buffer, 100);
    btn.setWildcard(buffer);