cancel
Showing results for 
Search instead for 
Did you mean: 

Unicode::snprintf() Problem

TLahr.1
Associate III

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();
}

2 REPLIES 2
Bob Bailey
Senior

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

"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.

0690X00000BvsyhQAB.png

Thanks for the guidance!