Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,

 

I am trying to run the following program that converts a UTF-8 to UTF-16 character encoding

 

   char *cSrc = (char*)MALLOC(sizeof(char));

   char *cDst = (char*)MALLOC(sizeof(char));      int nSrc, nDst = 50;

   int nErr, nConv = 0;

   AEECLSID cls;

   ICharsetConv * piConv = NULL;

   WSTRCPY (cSrc, L"Hello World"); 

   nSrc = WSTRLEN (cSrc); 

   cls = ISHELL_GetHandler(pMe->applet.m_pIShell, AEEIID_ICharsetConv, "UTF-8>UTF-16");

   if(0 == cls) {

      return AEE_EFAILED;

   }

   nErr = ISHELL_CreateInstance(pMe->applet.m_pIShell, cls, (void**) &piConv);

   if(AEE_SUCCESS != nErr) {

      return nErr;

   }

   nErr = ICharsetConv_Initialize(piConv, "UTF-8", "UTF-16", 0x20);

   if(AEE_SUCCESS != nErr) {

      return nErr;

   }

   nErr = ICharsetConv_CharsetConvert(piConv,

                                       (unsigned char **)&cSrc, &nSrc,

                                       (unsigned char **)&cDst, &nDst, &nConv);      if(AEE_SUCCESS != nErr) {

      return nErr;

   }   return 0;

 

In the above code, ICharsetConv_Initialize returns EUNSUPPORTED. What could be the possible reason for such an error?

 

Thanks in Advance,

Shashi Kant

i want to use these Api, and i using this code on my prject:
void test(){       ICharsetConv* piConv =NULL;   ILocale *piLocale=0;}
then the IDE said :ICharsetConv' : undeclared identifier.
ILocale : undeclared identifier.
does i miss some .h file which include ICharsetConv  ??
and which .h file i will add to the code??

i want to use these Api, and i using this code on my prject:
void test(){       ICharsetConv* piConv =NULL;   ILocale *piLocale=0;}
then the IDE said :ICharsetConv' : undeclared identifier.
ILocale : undeclared identifier.
does i miss some .h file which include ICharsetConv  ??
and which .h file i will add to the code??

faint, stupid question ,
 #include

faint, stupid question ,
 #include