#include "DHL_OSAL.h" #include "DHL_DBG.h" #define USE_INNER_KSX_TO_UNICODE_TABLE 1 #if USE_INNER_KSX_TO_UNICODE_TABLE #include "grp_ksx_unicode_table.h" #else //extern UINT16 DST_cktouk[]; extern UINT16 p_ck2uk_table[]; #endif int DMG_UStrLen(UINT16 *str) { int i; for(i=0; str[i]; i++); return i; } BOOL DMG_UStrCmp(UINT16 *str1, UINT16 *str2) { int i; for(i=0; str1[i] || str2[i]; i++) { if(str1[i]!=str2[i]) return FALSE; } return TRUE; } void DMG_UStrCpy(UINT16 *str_dst, UINT16 *str_src) { int i; for(i=0; str_src[i]; i++) str_dst[i]=str_src[i]; str_dst[i]='\0'; } void DMG_UStrNCpy(UINT16 *str_dst, UINT16 *str_src, int len) { int i; for(i=0; str_src[i] && i=0xb0a1 && code<=0xc8fe) { code-=45217; code=code/256*94 + code%256; ret_code=p_ck2uk_table[code]; } else if(code==0xa1a1) //space ret_code=0x20; else if(code==0xa3dc) //back slash -> won ret_code=0x20a9; else if(code>=0xa3a1 && code<=0xa3fe) ret_code=code-0xa380; else if(code==0xa2a6) ret_code=0x7e; else ret_code=0x20;//Áö¿øÇÏÁö ¾Ê´Â ÄÚµå´Â °ø¹é ó¸®//ret_code=0x25af; //Áö¿øÇÏÁö ¾Ê´Â codeÀÎ °æ¿ì ¼¼¿î Á÷»ç°¢Çü return ret_code; } UINT16 *DMG_MakeUniStr(char *str1, UINT16 *str2) { int i; for(i=0; str1[i]; i++) str2[i]=str1[i]; str2[i]='\0'; return str2; } UINT16 *DMG_MakeUniStr2(char *str) { static UINT16 uni_str[128]; int i; for(i=0; str[i] && i<128-1; i++) uni_str[i]=str[i]; uni_str[i]='\0'; return uni_str; }