Cannot display Unicode characters

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Cannot display Unicode characters

    I have converted a windows font MingLiu with the Font Converter with following settings: Font Type: Standard, Encoding: Unicode, Font: MingLiU. I use following code to try to display the characters:

    C Source Code

    1. GUI_SetFont(&GUI_FontMingLiU18_Unicode); GUI_UC_SetEncodeUTF8(); GUI_DispStringAt("\x89\x85",0,0) //no character display;


    With the above code, nothing is displayed on the lcd. When I use the encoding method of Shift-JIS in the Font Converter, the characters are displayed fine on the LCD by using the resulting c file.

    C Source Code

    1. GUI_SetFont(&GUI_FontMingLiU18_SJ);GUI_UC_SetEncodeUTF8(); GUI_DispStringAt("\x89\x85",0,0) // character displays fine;


    Thanks in advance for your help.

    Zubair Hameed
  • Hello,

    I assume you tried to show the Unicode character 0x8985. Further you used the function GUI_UC_SetEncodeUTF8() for automatic UTF8 decoding. In UTF8 the sequence "\x89\x85" is wrong to specify this character. Instead of this you should use "\xe8\xa6\x85". More infos about UTF8 you can find under en.wikipedia.org/wiki/UTF-8

    DJJ