Skip to main content
Professional
Associate III
May 22, 2019
Question

touchGFX and snprintf function

  • May 22, 2019
  • 11 replies
  • 3720 views

Hello,

i use snprintf function to print some UnicodeChar variable. But i have trouble to get special charcters printed (as é, è, ü...) by the mean of this function.

(even if i have declared in the typography wildcard Character column the special characters (éè) )

What is the right way to have these specials characters printed ?

Thanks

best regards   

exemple :

touchgfx::Unicode::UnicodeChar start_txt_next_service_valueBuffer[START_TXT_NEXT_SERVICE_VALUE_SIZE];

 Unicode::snprintf(start_txt_next_service_valueBuffer, START_TXT_NEXT_SERVICE_VALUE_SIZE, "%d %s", CAN_getNextServiceDays(), TypedText(T_START_NEXT_SERVICE_DAYS).getText());

This topic has been closed for replies.

11 replies

Professional
Associate III
June 17, 2019

Hello,

When i do not use the UnicodeChar variable start_txt_next_service_valueBuffer) link to tart_txt_next_service_value, that works OK :

  start_txt_next_service_value.setTypedText(TypedText(T_START_SERVICE_LINE2_NUM14)); prints well é or è special characters.

So th eproblem is not in the font generation, but in the fact we use a  touchgfx::Unicode::UnicodeChar buffer linked to a touchgfx::TextAreaWithOneWildcard variable.

Is there a way to print correctly special characters ?

Thanks

best regards