Skip to main content
Hwoo-
Associate II
January 11, 2022
Solved

Korean output not working using Unicode::snprintf()

  • January 11, 2022
  • 2 replies
  • 2016 views

Hello,

I want to print Korean in <value> of wild card

The encoding used in CubeIDE is attached as a picture file.

The touchGFX version we use is 4.16​.

​

The initial value entered in wildcard is normally output as "정지".

​(textArea and Typographies images are attached.)

​

"Unicode::snprintf(textMasterAirflowBuffer, TEXTMASTERAIRFLOW_SIZE, "STOP");" -> "STOP" is output.

Unicode::snprintf(textMasterAirflowBuffer, TEXTMASTERAIRFLOW_SIZE, "정지"); -> Fallback Character is output.

Unicode::snprintf(textMasterAirflowBuffer, TEXTMASTERAIRFLOW_SIZE, "%s", "정지"); -> Fallback Character is output.

​

How can I get Korea to be printed on the LCD normally?

Best regards,

​

​

​

​

​

​

​

​

​

​

This topic has been closed for replies.
Best answer by Romain DIELEMAN

Hi,

You need to add in the Typographies settings the Korean characters or range of characters you will use (just add 정지 in the "Wildcard Characters "tab for example in your case). This step is necessary otherwise TouchGFX will just return the fallback character.

Make sure also that your font handles Korean, I used on my side the Noto Serif KR version because Verdana would not handle 정지.

/Romain

2 replies

Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee
January 11, 2022

Hi,

You need to add in the Typographies settings the Korean characters or range of characters you will use (just add 정지 in the "Wildcard Characters "tab for example in your case). This step is necessary otherwise TouchGFX will just return the fallback character.

Make sure also that your font handles Korean, I used on my side the Noto Serif KR version because Verdana would not handle 정지.

/Romain

Hwoo-
Hwoo-Author
Associate II
February 9, 2022

Hi,

Sorry for the late reply because I was working on another project.

Thanks for the reply.

​Best regards,