JEONG
Dear SEGGER Forum Family
Hi, I am the user of the board 'STM32439I-EVAL2'.
I tried to write the Koean Font on the board. Thus, I have used the funtion to convert Unicode to UTF8 "GUI_UC_ConvertUC2UTF8(const U16 GUI_UNI_PTR * s, int Len, char * pBuffer, int BufferSize);" which can convert Unicode to UTF-8 code and "GUI_UC_SetEncodeUTF8();" which can activate UTF-8 code. But, It does not work at all. The most huge problem I got is that Unicode is not changed to UTF-8 code. I really want to know how to fix this problem the way to transduce Unicode to UFT-8. Here Is code I made as a sample.
<GUIDEMO_Intro>
extern GUI_CONST_STORAGE GUI_FONT GUI_FontHY_HumanLetter_ M 1 8 ;
U16 strTest[30];
U16 strUTFTest[32];
void GUIDEMO_Intro(void) {
char acVersion[30] = "Version of STemWin: ";
int xCenter, xSize, ySize;
xSize = LCD_GetXSize();
ySize = LCD_GetYSize();
xCenter = xSize >> 1;
GUIDEMO_DrawBk(0);
GUI_SetTextMode(GUI_TM_TRANS);
memset( strTest,0,sizeof(strTest) );
strTest[0]=0xAC00; //"geyeok
GUI_SetFont(&GUI_FontHY_HumanLetter_M 1 8 );
memset( strUTFTest,0,sizeof(strUTFTest));
<GUI_CONST_STORAGE GUI_FONT GUI_FontHY_HumanLetter_M18>
#include "GUI.h"
#ifndef GUI_CONST_STORAGE
#define GUI_CONST_STORAGE const
#endif
/* The following line needs to be included in any file selecting the
font.
*/
extern GUI_CONST_STORAGE GUI_FONT GUI_FontHY_HumanLetter_ M 1 8 ;
/* Start of unicode area <Hangul Syllables> */
GUI_CONST_STORAGE unsigned char acGUI_FontHY_HumanLetter_M18_AC00[ 28] = { /* code AC00, <Hangul Syllable, First> */
________,________,
__XXX___,___X____,
_____XX_,___X____,
______X_,___X____,
______X_,__X_____,
______X_,__XXXXX_,
______X_,__X_____,
_____X__,__X_____,
_____X__,__X_____,
_____X__,__X_____,
________,__X_____,
________,__X_____,
________,__X_____,
________,________};
I would really happy If anyone could help me to solve this problem.
Sinderely,
JEONG
The post was edited 5 times, last by Jeong ().