2022-06-10 01:06 AM
I set the character wildcards properly, to include all required characters.
Here's my example code:
Unicode::strncpy(errorTextBuffer, "Zażółć gęślą jaźń.", ERRORTEXT_SIZE);
errorText.resizeToCurrentText();
errorText.invalidate();
But what I get is this:
The character encoding for my entire project is "UTF-8", so this is the file encoding.
I tried to use UART as the debug console and it outputs the UTF-8 text with no problems.
I guess Unicode functions of TouchGFX don't expect the char* strings to be UTF-8. How it is done properly?
Solved! Go to Solution.
2022-06-10 01:15 AM
Oh, silly me:
Unicode::fromUTF8((const uint8_t*)"Zażółć gęślą jaźń", errorTextBuffer, ERRORTEXT_SIZE);
errorText.resizeToCurrentText();
errorText.invalidate();
2022-06-10 01:15 AM
Oh, silly me:
Unicode::fromUTF8((const uint8_t*)"Zażółć gęślą jaźń", errorTextBuffer, ERRORTEXT_SIZE);
errorText.resizeToCurrentText();
errorText.invalidate();