Skip to main content
TLahr.1
Associate II
January 11, 2020
Question

Unicode::snprintf() Problem

  • January 11, 2020
  • 2 replies
  • 812 views

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

This topic has been closed for replies.

2 replies

Bob Bailey
Senior
January 12, 2020

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

TLahr.1
TLahr.1Author
Associate II
January 12, 2020

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