2020-01-11 12:54 PM
I'm working with the STM32F769I-DISCO board and I'm having issues with the snprintf() Unicode function.
When I try to print a string to the screen only a few characters register, the rest show up as unknown characters.
For example, when I try to print "hello [x value]" to the screen, it prints "?ell? ?" instead.
Any advice?
Thanks
void mainScreenView::set_test_X()
{
test testx;
int x = testx.get_testX();
Unicode::snprintf(textArea1_1Buffer, TEXTAREA1_1_SIZE, "hello %i", x);
textArea1_1.setWildcard(textArea1_1Buffer);
textArea1_1.invalidate();
}
2020-01-11 09:35 PM
it looks like you don't have the characters you need enabled in the typographies section of Texts in the designer. that at least is whats happening with the numerical value
for the h and the 0 the font may not have those characters defined. I have read (on this forum) that different languages can have issues mapping characters. But if this is all english then I'm not sure
Bob
2020-01-12 10:41 AM
"it looks like you don't have the characters you need enabled in the typographies section of Texts in the designer."
Yup! That was it!
I simply added the desired character ranges in the typographies section; 0-9,A-z.
Thanks for the guidance!